PDFToolsContent.xaml 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  1. <UserControl x:Class="PDF_Office.Views.HomePanel.PDFTools.PDFToolsContent"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:local="clr-namespace:PDF_Office.Views.HomePanel.PDFTools"
  7. xmlns:customControl="clr-namespace:PDF_Office.CustomControl"
  8. xmlns:converter="clr-namespace:PDF_Office.DataConvert"
  9. Background="White" MinWidth="540" MinHeight="460"
  10. mc:Ignorable="d"
  11. d:DesignHeight="450" d:DesignWidth="800"
  12. >
  13. <UserControl.Resources>
  14. <ResourceDictionary>
  15. <ResourceDictionary.MergedDictionaries>
  16. <ResourceDictionary Source="../../../Styles/CustomListItemStyle.xaml"/>
  17. <ResourceDictionary Source="../../../Styles/CustomBtnStyle.xaml"/>
  18. </ResourceDictionary.MergedDictionaries>
  19. <converter:BoolToVisible x:Key="BoolToVisibilityConverter" />
  20. <Style x:Key="LabelSty"
  21. TargetType="{x:Type Label}">
  22. <Setter Property="Padding"
  23. Value="10,5" />
  24. <Setter Property="Background"
  25. Value="CadetBlue" />
  26. <Setter Property="Foreground"
  27. Value="White" />
  28. </Style>
  29. <DataTemplate x:Key="DataTemplate">
  30. <local:PDFToolItem x:Name="data"/>
  31. </DataTemplate>
  32. <ItemsPanelTemplate x:Key="ListItemsPanelTemplate">
  33. <WrapPanel AllowDrop="True"
  34. Orientation="Horizontal" />
  35. </ItemsPanelTemplate>
  36. </ResourceDictionary>
  37. </UserControl.Resources>
  38. <Grid x:Name="Grid" Margin="70,51,0,0">
  39. <Grid.RowDefinitions>
  40. <RowDefinition Height="auto" />
  41. <RowDefinition Height="auto" MinHeight="200" />
  42. <RowDefinition Height="auto" />
  43. <RowDefinition Height="*" />
  44. </Grid.RowDefinitions>
  45. <StackPanel AllowDrop="True"
  46. DragOver="ListBoxShortCuts_DragOver"
  47. Drop="ListBoxShortCuts_Drop"
  48. PreviewMouseMove="ListBoxMoreCuts_PreviewMouseMove"
  49. >
  50. <Grid>
  51. <TextBlock Text="PDF 工具" FontSize="16" FontFamily="PingFang SC"/>
  52. <StackPanel
  53. x:Name="PnlToolsUIBtns" Grid.ColumnSpan="2"
  54. Grid.Column="0"
  55. Margin="0,0,12,0"
  56. HorizontalAlignment="Right"
  57. VerticalAlignment="Top"
  58. Orientation="Horizontal"
  59. Visibility="Visible">
  60. <Button
  61. x:Name="BtnTools"
  62. Width="68"
  63. Height="28"
  64. Margin="0,0,0,0"
  65. Background="#FFFFFF"
  66. Content="Tools"
  67. Click="BtnTools_Click"
  68. >
  69. </Button>
  70. <customControl:CustomIconToggleBtn x:Name="BtnExptend" Click="BtnExptend_Click"
  71. Style="{StaticResource ToggleBtnViewModeStyle}"
  72. >
  73. <TextBlock Text="展开"/>
  74. </customControl:CustomIconToggleBtn>
  75. </StackPanel>
  76. </Grid>
  77. <TextBlock Text="首页快捷工具" Margin="0,16,0,0" FontSize="14" FontFamily="PingFang SC"/>
  78. </StackPanel>
  79. <Label Name="label1" Visibility="Collapsed"
  80. Grid.Row="0"
  81. AllowDrop="True"
  82. Content="快捷工具"
  83. DragOver="ListBoxShortCuts_DragOver"
  84. Drop="ListBoxShortCuts_Drop"
  85. FontSize="20"
  86. PreviewMouseMove="ListBoxMoreCuts_PreviewMouseMove"
  87. Style="{StaticResource LabelSty}" />
  88. <customControl:ListBoxEx x:Name="ListShortCuts" HorizontalAlignment="Stretch" Margin="0,8,0,0" MinWidth="540"
  89. Grid.Row="1"
  90. AllowDrop="True"
  91. BorderThickness="0"
  92. SizeChanged="ListBoxShortCuts_SizeChanged"
  93. DragOver="ListBoxShortCuts_DragOver"
  94. Drop="ListBoxShortCuts_Drop"
  95. ItemContainerStyle="{StaticResource ListBoxItemStyle}"
  96. ItemTemplate="{StaticResource DataTemplate}"
  97. ItemsPanel="{StaticResource ListItemsPanelTemplate}"
  98. PreviewMouseMove="ListBoxShortCuts_PreviewMouseMove"
  99. ScrollViewer.HorizontalScrollBarVisibility="Disabled"
  100. SelectionMode="Extended" />
  101. <StackPanel Grid.Row="2" Margin="0,16,0,16" AllowDrop="True"
  102. DragOver="ListBoxShortCuts_DragOver"
  103. Drop="ListBoxShortCuts_Drop"
  104. PreviewMouseMove="ListBoxMoreCuts_PreviewMouseMove"
  105. >
  106. <TextBlock Text="更多工具" FontSize="14" FontFamily="PingFang SC"/>
  107. </StackPanel>
  108. <Label Grid.Row="2" Visibility="Collapsed"
  109. AllowDrop="True"
  110. Content="更多工具"
  111. DragOver="ListBoxShortCuts_DragOver"
  112. Drop="ListBoxShortCuts_Drop"
  113. FontSize="20"
  114. PreviewMouseMove="ListBoxMoreCuts_PreviewMouseMove"
  115. Style="{StaticResource LabelSty}" />
  116. <customControl:ListBoxEx x:Name="ListMoreCuts" HorizontalAlignment="Stretch" MinWidth="540"
  117. Grid.Row="3"
  118. AllowDrop="True"
  119. BorderThickness="0"
  120. SizeChanged="ListBoxMoreCuts_SizeChanged"
  121. DragOver="ListBoxShortCuts_DragOver"
  122. ItemContainerStyle="{StaticResource MoreListBoxItemStyle}"
  123. ItemTemplate="{StaticResource DataTemplate}"
  124. ItemsPanel="{StaticResource ListItemsPanelTemplate}"
  125. PreviewMouseMove="ListBoxMoreCuts_PreviewMouseMove"
  126. ScrollViewer.HorizontalScrollBarVisibility="Disabled"
  127. SelectionMode="Extended" />
  128. <Image x:Name="sourceImage"
  129. Grid.RowSpan="4"
  130. Width="260"
  131. Height="80"
  132. HorizontalAlignment="Left"
  133. VerticalAlignment="Top"
  134. AllowDrop="True"
  135. IsHitTestVisible="False" />
  136. <Grid>
  137. <Image x:Name="moveImage"
  138. Grid.RowSpan="4"
  139. Width="260"
  140. Height="80"
  141. HorizontalAlignment="Left"
  142. VerticalAlignment="Top"
  143. IsHitTestVisible="False"
  144. Visibility="Hidden">
  145. <Image.RenderTransform>
  146. <TranslateTransform x:Name="tt"
  147. X="0"
  148. Y="0" />
  149. </Image.RenderTransform>
  150. </Image>
  151. </Grid>
  152. </Grid>
  153. </UserControl>