PDFToolsContent.xaml 7.0 KB

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