ToolsContent.xaml 3.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. <UserControl x:Class="PDF_Office.Views.Tools.ToolsContent"
  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/"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  7. xmlns:viewmodels="clr-namespace:PDF_Office.ViewModels" xmlns:tools="clr-namespace:PDF_Office.ViewModels.Tools" d:DataContext="{d:DesignInstance Type=tools:ToolsContentViewModel}"
  8. prism:ViewModelLocator.AutoWireViewModel="True"
  9. d:DesignHeight="40"
  10. d:DesignWidth="800"
  11. mc:Ignorable="d">
  12. <UserControl.Resources>
  13. <ResourceDictionary>
  14. <ResourceDictionary.MergedDictionaries>
  15. <ResourceDictionary Source="../../Styles/ToolsBtnStyle.xaml"/>
  16. <ResourceDictionary Source="../../Styles/ToolsMenuStyle.xaml"/>
  17. </ResourceDictionary.MergedDictionaries>
  18. </ResourceDictionary>
  19. </UserControl.Resources>
  20. <Grid>
  21. <Border x:Name="ToolsBorder" BorderBrush="#1A000000" BorderThickness="0,1,0,1" Height="40">
  22. <Grid>
  23. <WrapPanel Height="40" HorizontalAlignment="Center">
  24. <Button x:Name="btnCompress" Style="{StaticResource ToolsBtnStyle}" Command="{Binding CompressCommand}">
  25. <StackPanel Orientation="Horizontal" Margin="12 0 12 0">
  26. <StackPanel Margin="0,0,8,0">
  27. <Border Height="30" Width="30" Background="LightSeaGreen" ></Border>
  28. </StackPanel >
  29. <TextBlock Text="压缩" VerticalAlignment="Center"></TextBlock>
  30. </StackPanel>
  31. </Button>
  32. <Menu Background="White">
  33. <MenuItem x:Name="btnPassword" Height="40" Padding="0" Width="auto" BorderThickness="0" >
  34. <MenuItem.Header>
  35. <StackPanel Orientation="Horizontal" Margin="12 0 12 0" VerticalAlignment="Center">
  36. <StackPanel Margin="0,0,8,0" VerticalAlignment="Center">
  37. <Border Height="30" Width="30" Background="LightSeaGreen" ></Border>
  38. </StackPanel >
  39. <TextBlock x:Name="txtPassword" Padding="0,12,0,0" Text="安全" Height="40" FontSize="12"/>
  40. <Path Fill="Black" VerticalAlignment="Center" HorizontalAlignment="Right" Data="M0 0L4 4L8 0H0Z">
  41. <Path.RenderTransform>
  42. <TranslateTransform X="8"/>
  43. </Path.RenderTransform>
  44. </Path>
  45. </StackPanel>
  46. </MenuItem.Header>
  47. <MenuItem Name="MenuEncrypt" Style="{StaticResource ToolsMenuStyle}">
  48. <MenuItem.Header>
  49. <TextBlock Text="设置密码" ></TextBlock>
  50. </MenuItem.Header>
  51. </MenuItem>
  52. <MenuItem Name="MenuDecrypt" Style="{StaticResource ToolsMenuStyle}">
  53. <MenuItem.Header>
  54. <TextBlock Text="解除安全性设置"></TextBlock>
  55. </MenuItem.Header>
  56. </MenuItem>
  57. </MenuItem>
  58. </Menu>
  59. </WrapPanel>
  60. </Grid>
  61. </Border>
  62. </Grid>
  63. </UserControl>