ToolsBarContent.xaml 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  1. <UserControl x:Class="PDF_Office.Views.Tools.ToolsBarContent"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:prism="http://prismlibrary.com/" xmlns:tools="clr-namespace:PDF_Office.ViewModels.Tools" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  5. prism:ViewModelLocator.AutoWireViewModel="True">
  6. <UserControl.Resources>
  7. <ResourceDictionary>
  8. <ResourceDictionary.MergedDictionaries>
  9. <ResourceDictionary Source="../../Styles/CustomBtnStyle.xaml"/>
  10. <ResourceDictionary Source="../../Styles/MenuStyle.xaml"/>
  11. </ResourceDictionary.MergedDictionaries>
  12. </ResourceDictionary>
  13. </UserControl.Resources>
  14. <Grid>
  15. <Border x:Name="ToolsBorder" BorderBrush="#1A000000" BorderThickness="0,1,0,1" Height="40">
  16. <WrapPanel HorizontalAlignment="Center" Height="40">
  17. <Button Style="{StaticResource InsideBarBtnStyle }" Command="{Binding CompressCommand}">
  18. <StackPanel Orientation="Horizontal" Margin="12 0 12 0">
  19. <StackPanel Margin="0,0,8,0">
  20. <Border Height="30" Width="30" Background="LightSeaGreen" ></Border>
  21. </StackPanel >
  22. <TextBlock Text="压缩" VerticalAlignment="Center"></TextBlock>
  23. </StackPanel>
  24. </Button>
  25. <Button Style="{StaticResource InsideBarBtnStyle }" >
  26. <StackPanel Orientation="Horizontal" Margin="12 0 12 0">
  27. <StackPanel Margin="0,0,8,0">
  28. <Border Height="30" Width="30" Background="LightSeaGreen" ></Border>
  29. </StackPanel >
  30. <TextBlock Text="合并" VerticalAlignment="Center"></TextBlock>
  31. </StackPanel>
  32. </Button>
  33. <Button Style="{StaticResource InsideBarBtnStyle }">
  34. <StackPanel Orientation="Horizontal" Margin="12 0 12 0">
  35. <StackPanel Margin="0,0,8,0">
  36. <Border Height="30" Width="30" Background="LightSeaGreen" ></Border>
  37. </StackPanel >
  38. <TextBlock Text="文件对比" VerticalAlignment="Center"></TextBlock>
  39. </StackPanel>
  40. </Button>
  41. <Menu Background="White">
  42. <MenuItem x:Name="btnPassword" Height="40" Padding="0" Width="auto" BorderThickness="0" >
  43. <MenuItem.Header>
  44. <StackPanel Orientation="Horizontal" Margin="12 0 12 0" VerticalAlignment="Center">
  45. <StackPanel Margin="0,0,8,0" VerticalAlignment="Center">
  46. <Border Height="30" Width="30" Background="LightSeaGreen" ></Border>
  47. </StackPanel >
  48. <TextBlock x:Name="txtPassword" Padding="0,12,0,0" Text="安全" Height="40" FontSize="12"/>
  49. <Path Fill="Black" VerticalAlignment="Center" HorizontalAlignment="Right" Data="M0 0L4 4L8 0H0Z">
  50. <Path.RenderTransform>
  51. <TranslateTransform X="8"/>
  52. </Path.RenderTransform>
  53. </Path>
  54. </StackPanel>
  55. </MenuItem.Header>
  56. <MenuItem Name="MenuEncrypt" Style="{StaticResource ToolsMenuStyle }" Command="{Binding SetPasswordCommand}">
  57. <MenuItem.Header>
  58. <TextBlock Text="设置密码" ></TextBlock>
  59. </MenuItem.Header>
  60. </MenuItem>
  61. <MenuItem Name="MenuDecrypt" Style="{StaticResource ToolsMenuStyle }" Command="{Binding CancelPasswordCommand}">
  62. <MenuItem.Header>
  63. <TextBlock Text="解除安全性设置"></TextBlock>
  64. </MenuItem.Header>
  65. </MenuItem>
  66. </MenuItem>
  67. </Menu>
  68. <Button Name="RedactionContent" Style="{StaticResource InsideBarBtnStyle }" Command="{Binding SetEditToolsCommand }" CommandParameter="{Binding ElementName=RedactionContent}" >
  69. <StackPanel Orientation="Horizontal" Margin="12 0 12 0">
  70. <StackPanel Margin="0,0,8,0">
  71. <Border Height="30" Width="30" Background="LightSeaGreen" ></Border>
  72. </StackPanel >
  73. <TextBlock Text="密文" VerticalAlignment="Center"></TextBlock>
  74. <Path Fill="Black" VerticalAlignment="Center" HorizontalAlignment="Right" Data="M0 0L4 4L8 0H0Z">
  75. <Path.RenderTransform>
  76. <TranslateTransform X="8"/>
  77. </Path.RenderTransform>
  78. </Path>
  79. </StackPanel>
  80. </Button>
  81. <Button x:Name="WatermarkContent" Style="{StaticResource InsideBarBtnStyle }" Command="{Binding SetEditToolsCommand }" CommandParameter="{Binding ElementName=WatermarkContent}">
  82. <StackPanel Orientation="Horizontal" Margin="12 0 12 0">
  83. <StackPanel Margin="0,0,8,0">
  84. <Border Height="30" Width="30" Background="LightSeaGreen" ></Border>
  85. </StackPanel >
  86. <TextBlock Text="水印" VerticalAlignment="Center"></TextBlock>
  87. <Path Fill="Black" VerticalAlignment="Center" HorizontalAlignment="Right" Data="M0 0L4 4L8 0H0Z">
  88. <Path.RenderTransform>
  89. <TranslateTransform X="8"/>
  90. </Path.RenderTransform>
  91. </Path>
  92. </StackPanel>
  93. </Button>
  94. <Button Name="BackgroundContent" Style="{StaticResource InsideBarBtnStyle }" Command="{Binding SetEditToolsCommand }" CommandParameter="{Binding ElementName=BackgroundContent}">
  95. <StackPanel Orientation="Horizontal" Margin="12 0 12 0">
  96. <StackPanel Margin="0,0,8,0">
  97. <Border Height="30" Width="30" Background="LightSeaGreen" ></Border>
  98. </StackPanel >
  99. <TextBlock Text="背景" VerticalAlignment="Center"></TextBlock>
  100. <Path Fill="Black" VerticalAlignment="Center" HorizontalAlignment="Right" Data="M0 0L4 4L8 0H0Z">
  101. <Path.RenderTransform>
  102. <TranslateTransform X="8"/>
  103. </Path.RenderTransform>
  104. </Path>
  105. </StackPanel>
  106. </Button>
  107. <Button Name="HeaderFooterContent" Style="{StaticResource InsideBarBtnStyle }" Command="{Binding SetEditToolsCommand }" CommandParameter="{Binding ElementName=HeaderFooterContent}">
  108. <StackPanel Orientation="Horizontal" Margin="12 0 12 0">
  109. <StackPanel Margin="0,0,8,0">
  110. <Border Height="30" Width="30" Background="LightSeaGreen" ></Border>
  111. </StackPanel >
  112. <TextBlock Text="页眉页脚" VerticalAlignment="Center"></TextBlock>
  113. <Path Fill="Black" VerticalAlignment="Center" HorizontalAlignment="Right" Data="M0 0L4 4L8 0H0Z">
  114. <Path.RenderTransform>
  115. <TranslateTransform X="8"/>
  116. </Path.RenderTransform>
  117. </Path>
  118. </StackPanel>
  119. </Button>
  120. <Button Name="BatesContent" Style="{StaticResource InsideBarBtnStyle }" Command="{Binding SetEditToolsCommand }" CommandParameter="{Binding ElementName=BatesContent}">
  121. <StackPanel Orientation="Horizontal" Margin="12 0 12 0">
  122. <StackPanel Margin="0,0,8,0">
  123. <Border Height="30" Width="30" Background="LightSeaGreen" ></Border>
  124. </StackPanel >
  125. <TextBlock Text="贝茨码" VerticalAlignment="Center"></TextBlock>
  126. <Path Fill="Black" VerticalAlignment="Center" HorizontalAlignment="Right" Data="M0 0L4 4L8 0H0Z">
  127. <Path.RenderTransform>
  128. <TranslateTransform X="8"/>
  129. </Path.RenderTransform>
  130. </Path>
  131. </StackPanel>
  132. </Button>
  133. <Button Style="{StaticResource InsideBarBtnStyle }">
  134. <StackPanel Orientation="Horizontal" Margin="12 0 12 0">
  135. <StackPanel Margin="0,0,8,0">
  136. <Border Height="30" Width="30" Background="LightSeaGreen" ></Border>
  137. </StackPanel >
  138. <TextBlock Text="裁剪" VerticalAlignment="Center"></TextBlock>
  139. </StackPanel>
  140. </Button>
  141. </WrapPanel>
  142. </Border>
  143. </Grid>
  144. </UserControl>