CPDFTitleBarControl.xaml 5.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. <UserControl x:Class="Compdfkit_Tools.PDFControl.CPDFTitleBarControl"
  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:common="clr-namespace:Compdfkit_Tools.Common"
  7. mc:Ignorable="d"
  8. d:DesignHeight="40" d:DesignWidth="1280">
  9. <UserControl.Resources>
  10. <ResourceDictionary>
  11. <ResourceDictionary.MergedDictionaries>
  12. <ResourceDictionary Source="../../Asset/Styles/MenuItemStyle.xaml"></ResourceDictionary>
  13. </ResourceDictionary.MergedDictionaries>
  14. <common:CommonResourceConverter x:Key="CommonResourceConverter"></common:CommonResourceConverter>
  15. </ResourceDictionary>
  16. </UserControl.Resources>
  17. <Grid x:Name="TitleBarGrid" Background="#FFFFFF" HorizontalAlignment="Stretch">
  18. <Grid Height="40" Width="auto" HorizontalAlignment="Left">
  19. <StackPanel Orientation="Horizontal">
  20. <Menu
  21. Width="auto"
  22. Background="Transparent"
  23. VerticalAlignment="Top"
  24. HorizontalAlignment="Left">
  25. <MenuItem Header="{Binding Converter={StaticResource CommonResourceConverter},ConverterParameter=Menu_File}" Style="{StaticResource Dropdown_MenuItem}">
  26. <MenuItem Header="{Binding Converter={StaticResource CommonResourceConverter},ConverterParameter=FileMenu_Open}" Name="OpenFileItem" Style="{StaticResource Sub_MenuItem}" Click="OpenFileItem_Click"></MenuItem>
  27. <MenuItem Header="{Binding Converter={StaticResource CommonResourceConverter},ConverterParameter=FileMenu_Save}" Style="{StaticResource Sub_MenuItem}" Click="SaveFileItem_Click" IsEnabled="{Binding CanSave, RelativeSource={RelativeSource AncestorType=UserControl}}"></MenuItem>
  28. <MenuItem Header="{Binding Converter={StaticResource CommonResourceConverter},ConverterParameter=FileMenu_SaveAs}" Style="{StaticResource Sub_MenuItem}" Click="SaveAsItem_Click"></MenuItem>
  29. <MenuItem Header="{Binding Converter={StaticResource CommonResourceConverter},ConverterParameter=FileMenu_Flatten}" Style="{StaticResource Sub_MenuItem}" Click="FlattenItem_Click"></MenuItem>
  30. </MenuItem>
  31. <MenuItem Header="{Binding Converter={StaticResource CommonResourceConverter},ConverterParameter=Menu_Help}" Style="{StaticResource Dropdown_MenuItem}">
  32. <MenuItem Header="{Binding Converter={StaticResource CommonResourceConverter},ConverterParameter=HelpMenu_About}" Style="{StaticResource Sub_MenuItem}" Click="AboutUsItem_Click"></MenuItem>
  33. <MenuItem Header="{Binding Converter={StaticResource CommonResourceConverter},ConverterParameter=HelpMenu_Contact}" Style="{StaticResource Sub_MenuItem}" Click="ContactUs_Click"></MenuItem>
  34. <MenuItem Header="{Binding Converter={StaticResource CommonResourceConverter},ConverterParameter=HelpMenu_Support}" Style="{StaticResource Sub_MenuItem}" Click="TechnicalSupport_Click"></MenuItem>
  35. <MenuItem Header="{Binding Converter={StaticResource CommonResourceConverter},ConverterParameter=HelpMenu_Privacy}" Style="{StaticResource Sub_MenuItem}" Click="PrivacyAgreement_Click"></MenuItem>
  36. <MenuItem Header="{Binding Converter={StaticResource CommonResourceConverter},ConverterParameter=HelpMenu_Service}" Style="{StaticResource Sub_MenuItem}" Click="ServiceTerms_Click"></MenuItem>
  37. <MenuItem Header="{Binding Converter={StaticResource CommonResourceConverter},ConverterParameter=HelpMenu_DeviceID}" Style="{StaticResource Sub_MenuItem}" Click="DeviceSerial_Click"></MenuItem>
  38. </MenuItem>
  39. </Menu>
  40. <Menu
  41. Width="auto"
  42. Background="Transparent"
  43. VerticalAlignment="Top"
  44. HorizontalAlignment="Left" Visibility="Collapsed">
  45. <MenuItem Header="Settings" Style="{StaticResource Dropdown_MenuItem}">
  46. <MenuItem Header="Theme" Width="100" Style="{StaticResource Sub_Dropdown_MenuItem}">
  47. <MenuItem Header="Light" Style="{StaticResource Dropdown_Sub_MenuItem}"></MenuItem>
  48. <MenuItem Header="Dark" Style="{StaticResource Dropdown_Sub_MenuItem}"></MenuItem>
  49. </MenuItem>
  50. <MenuItem Header="Mode" Style="{StaticResource Sub_Dropdown_MenuItem}">
  51. <MenuItem Header="View" Style="{StaticResource Dropdown_Sub_MenuItem}"></MenuItem>
  52. </MenuItem>
  53. <MenuItem Header="Cutting" Style="{StaticResource Sub_MenuItem}"></MenuItem>
  54. </MenuItem>
  55. </Menu>
  56. <Menu
  57. Width="auto"
  58. Background="Transparent"
  59. VerticalAlignment="Top"
  60. HorizontalAlignment="Left" Visibility="Collapsed">
  61. <MenuItem Header="Help" Style="{StaticResource Dropdown_MenuItem}">
  62. <MenuItem Header="Guide" Style="{StaticResource Sub_MenuItem }"></MenuItem>
  63. <MenuItem Header="Api Reference" Style="{StaticResource Sub_MenuItem }"></MenuItem>
  64. <MenuItem Header="Contact us" Style="{StaticResource Sub_MenuItem }"></MenuItem>
  65. </MenuItem>
  66. </Menu>
  67. </StackPanel>
  68. </Grid>
  69. </Grid>
  70. </UserControl>