CPDFTitleBarControl.xaml 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. <UserControl x:Class="ComPDFKit.Controls.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.Controls.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. <MenuItem Header="{Binding Converter={StaticResource CommonResourceConverter},ConverterParameter=Printer_Print}" Style="{StaticResource Dropdown_MenuItem}" Click="PrintItem_Click"></MenuItem>
  40. </Menu>
  41. <Menu
  42. Width="auto"
  43. Background="Transparent"
  44. VerticalAlignment="Top"
  45. HorizontalAlignment="Left" Visibility="Collapsed">
  46. <MenuItem Header="Settings" Style="{StaticResource Dropdown_MenuItem}">
  47. <MenuItem Header="Theme" Width="100" Style="{StaticResource Sub_Dropdown_MenuItem}">
  48. <MenuItem Header="Light" Style="{StaticResource Dropdown_Sub_MenuItem}"></MenuItem>
  49. <MenuItem Header="Dark" Style="{StaticResource Dropdown_Sub_MenuItem}"></MenuItem>
  50. </MenuItem>
  51. <MenuItem Header="Mode" Style="{StaticResource Sub_Dropdown_MenuItem}">
  52. <MenuItem Header="View" Style="{StaticResource Dropdown_Sub_MenuItem}"></MenuItem>
  53. </MenuItem>
  54. <MenuItem Header="Cutting" Style="{StaticResource Sub_MenuItem}"></MenuItem>
  55. </MenuItem>
  56. </Menu>
  57. <Menu
  58. Width="auto"
  59. Background="Transparent"
  60. VerticalAlignment="Top"
  61. HorizontalAlignment="Left" Visibility="Collapsed">
  62. <MenuItem Header="Help" Style="{StaticResource Dropdown_MenuItem}">
  63. <MenuItem Header="Guide" Style="{StaticResource Sub_MenuItem }"></MenuItem>
  64. <MenuItem Header="Api Reference" Style="{StaticResource Sub_MenuItem }"></MenuItem>
  65. <MenuItem Header="Contact us" Style="{StaticResource Sub_MenuItem }"></MenuItem>
  66. </MenuItem>
  67. </Menu>
  68. </StackPanel>
  69. </Grid>
  70. </Grid>
  71. </UserControl>