QuickToolsContent.xaml 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. <UserControl
  2. x:Class="PDF_Office.Views.HomePanel.PDFTools.QuickToolsContent"
  3. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  4. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:local="clr-namespace:PDF_Office.Views.HomePanel"
  7. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  8. xmlns:customControl="clr-namespace:PDF_Office.CustomControl"
  9. xmlns:converter="clr-namespace:PDF_Office.DataConvert"
  10. xmlns:pDFTools="clr-namespace:PDF_Office.Views.HomePanel.PDFTools"
  11. d:DesignHeight="450"
  12. d:DesignWidth="800"
  13. mc:Ignorable="d">
  14. <UserControl.Resources>
  15. <ResourceDictionary>
  16. <ResourceDictionary.MergedDictionaries>
  17. <ResourceDictionary Source="../../../Styles/CustomListItemStyle.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. <pDFTools:PDFToolItem x:Name="data"/>
  31. </DataTemplate>
  32. <ItemsPanelTemplate x:Key="ListItemsPanelTemplate">
  33. <WrapPanel AllowDrop="True"
  34. Orientation="Horizontal" />
  35. </ItemsPanelTemplate>
  36. <Style x:Key="QuickToolsListBoxItemStyle" BasedOn="{StaticResource MoreListBoxItemStyle}"
  37. TargetType="{x:Type customControl:ListItemQuickTool}">
  38. <EventSetter Event="PreviewMouseLeftButtonUp"
  39. Handler="QuickTools_Click"/>
  40. </Style>
  41. </ResourceDictionary>
  42. </UserControl.Resources>
  43. <Grid Grid.ColumnSpan="2" Margin="0,0,20,0">
  44. <Grid.RowDefinitions>
  45. <RowDefinition Height="Auto"/>
  46. <RowDefinition Height="*"/>
  47. </Grid.RowDefinitions>
  48. <TextBlock
  49. x:Name="TxbQuickToolsTitle"
  50. Margin="0,0,0,16"
  51. FontSize="24"
  52. FontWeight="SemiBold"
  53. Text="Quick Tools" />
  54. <StackPanel
  55. x:Name="PnlToolsUIBtns" Grid.ColumnSpan="2"
  56. Grid.Column="0"
  57. Margin="0,0,12,0"
  58. HorizontalAlignment="Right"
  59. VerticalAlignment="Top"
  60. Orientation="Horizontal"
  61. Visibility="Visible">
  62. <Button
  63. x:Name="BtnTools"
  64. Width="68"
  65. Height="28"
  66. Margin="0,0,0,0"
  67. Background="#FFFFFF"
  68. Content="Tools"
  69. Click="BtnTools_Click"
  70. >
  71. </Button>
  72. <Button
  73. x:Name="BtnMore"
  74. Width="28"
  75. Height="28"
  76. Margin="12,0,0,0"
  77. Background="#FFFFFF" BorderThickness="0" Content="..."
  78. Click="BtnMore_Click"
  79. >
  80. </Button>
  81. </StackPanel>
  82. <Grid
  83. x:Name="GridAllTools"
  84. Grid.Row="1" Height="270"
  85. SizeChanged="GridAllTools_SizeChanged">
  86. <customControl:ListBoxEx x:Name="ListBoxToolBars" HorizontalAlignment="Stretch" MinWidth="540"
  87. Grid.Row="3"
  88. AllowDrop="True"
  89. BorderThickness="0"
  90. SizeChanged="ListBoxShortCuts_SizeChanged"
  91. ItemContainerStyle="{StaticResource QuickToolsListBoxItemStyle}"
  92. ItemTemplate="{StaticResource DataTemplate}"
  93. ItemsPanel="{StaticResource ListItemsPanelTemplate}"
  94. ScrollViewer.HorizontalScrollBarVisibility="Disabled"
  95. SelectionMode="Single" />
  96. </Grid>
  97. </Grid>
  98. </UserControl>