MainWindow.xaml 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. <Window x:Class="viewer_ctrl_demo.MainWindow"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  5. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  6. xmlns:local="clr-namespace:viewer_ctrl_demo"
  7. xmlns:pdftools="clr-namespace:compdfkit_tools.PDFControl;assembly=com.compdfkit.tools"
  8. mc:Ignorable="d"
  9. Title="MainWindow" Height="960" Width="1280" WindowStartupLocation="CenterScreen">
  10. <Grid>
  11. <Grid.RowDefinitions>
  12. <RowDefinition Height="40"></RowDefinition>
  13. <RowDefinition></RowDefinition>
  14. <RowDefinition Height="40"></RowDefinition>
  15. </Grid.RowDefinitions>
  16. <pdftools:TitleBarControl x:Name="TitleBarControl" Grid.ColumnSpan="2"></pdftools:TitleBarControl>
  17. <Grid Grid.Row="1">
  18. <Grid.ColumnDefinitions>
  19. <ColumnDefinition Width="40"></ColumnDefinition>
  20. <ColumnDefinition Width="auto"></ColumnDefinition>
  21. <ColumnDefinition Width="*"></ColumnDefinition>
  22. <ColumnDefinition Width="auto"></ColumnDefinition>
  23. </Grid.ColumnDefinitions>
  24. <!--左侧工具栏-->
  25. <StackPanel Name="BotaSideTool" Grid.Column="0" Background="{StaticResource color.bg.jumpbar}" Orientation="Vertical">
  26. <!--文字搜索-->
  27. <ToggleButton Name="SearchToolButton" Height="40" Padding="0,5,0,5" BorderThickness="0" Background="{StaticResource color.bg.jumpbar}" Click="SearchToolButton_Click">
  28. <ToggleButton.Content>
  29. <Path Width="20" Height="20" Fill="#273C62">
  30. <Path.Data>
  31. M14 8.5C14 11.5376 11.5376 14 8.5 14C5.46243 14 3 11.5376 3 8.5C3 5.46243 5.46243 3 8.5 3C11.5376 3 14 5.46243 14 8.5ZM13.0492 14.4633C11.7874 15.4274
  32. 10.2106 16 8.5 16C4.35786 16 1 12.6421 1 8.5C1 4.35786 4.35786 1 8.5 1C12.6421 1 16 4.35786 16 8.5C16 10.2105 15.4274 11.7873 14.4634 13.0491L18.4572
  33. 17.0429L17.043 18.4571L13.0492 14.4633Z
  34. </Path.Data>
  35. </Path>
  36. </ToggleButton.Content>
  37. </ToggleButton>
  38. <!--缩略图-->
  39. <ToggleButton Name="ThumbToolButton" Height="40" Padding="0,5,0,5" BorderThickness="0" Background="{StaticResource color.bg.jumpbar}" Click="ThumbToolButton_Click">
  40. <ToggleButton.Content>
  41. <Path Width="20" Height="20" Fill="#273C62">
  42. <Path.Data>
  43. M15 9V17H5L5 3L9 3V7C9 8.10457 9.89543 9 11 9H15ZM14.1716 7H11V3.82843L12.5858 5.41421L14.1716 7ZM17 8V17C17 18.1046 16.1046 19 15 19H5C3.89543 19 3
  44. 18.1046 3 17V3C3 1.89543 3.89543 1 5 1H10H10.1716C10.702 1 11.2107 1.21071 11.5858 1.58579L14 4L16.4142 6.41421C16.7893 6.78929 17 7.29799 17 7.82843V8Z
  45. </Path.Data>
  46. </Path>
  47. </ToggleButton.Content>
  48. </ToggleButton>
  49. <ToggleButton Name="OutlineToolButton" Height="40" Padding="0,5,0,5" BorderThickness="0" Background="{StaticResource color.bg.jumpbar}" Click="OutlineToolButton_Click">
  50. <ToggleButton.Content>
  51. <Path Width="20" Height="20" Fill="#273C62">
  52. <Path.Data>
  53. M5,14.375 L5,18.125 L1.25,18.125 L1.25,14.375 L5,14.375 Z M18.75,15.625 L18.75,16.875 L7.5,16.875 L7.5,15.625 L18.75,15.625 Z M5,8.125 L5,11.875 L1.25,11.875 L1.25,8.125 L5,8.125 Z M18.75,9.375 L18.75,10.625 L7.5,10.625 L7.5,9.375 L18.75,9.375 Z M5,1.875 L5,5.625 L1.25,5.625 L1.25,1.875 L5,1.875 Z M18.75,3.125 L18.75,4.375 L7.5,4.375 L7.5,3.125 L18.75,3.125 Z
  54. </Path.Data>
  55. </Path>
  56. </ToggleButton.Content>
  57. </ToggleButton>
  58. <!--书签-->
  59. <ToggleButton Name="BookmarkToolButton" Height="40" Padding="0,5,0,5" BorderThickness="0" Background="{StaticResource color.bg.jumpbar}" Click="BookmarkToolButtonn_Click">
  60. <ToggleButton.Content>
  61. <Path Width="20" Height="20" Fill="#273C62">
  62. <Path.Data>
  63. M11.3793 12.8851C10.6069 12.1494 9.3931 12.1494 8.62069 12.8851L5 16.3333V3H15V16.3333L11.3793 12.8851ZM15.3103 19.3908L10 14.3333L4.68966
  64. 19.3908C4.053 19.9971 3 19.5459 3 18.6667V3C3 1.89543 3.89543 1 5 1H15C16.1046 1 17 1.89543 17 3V18.6667C17 19.5459 15.947 19.9971
  65. 15.3103 19.3908ZM7 5H8H12H13V6V7H12H8H7V6V5Z
  66. </Path.Data>
  67. </Path>
  68. </ToggleButton.Content>
  69. </ToggleButton>
  70. </StackPanel>
  71. <!--工具栏展开-->
  72. <Border Name="BotaToolContainer" Grid.Column="1" BorderThickness="0,0,1,0" BorderBrush="Gray" Visibility="Collapsed"></Border>
  73. <!--PDFViewer-->
  74. <Border Grid.Column="2" x:Name="PDFGrid" Background="{StaticResource color.bg.mainpage}"> </Border>
  75. <!--右侧面板-->
  76. <Grid Grid.Column="3" Visibility="Hidden"></Grid>
  77. </Grid>
  78. <!--底部工具栏-->
  79. <Grid Grid.Row="2" Background="#FFFFFF">
  80. <StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
  81. <Rectangle Width="1" Fill="#AAAAAA" Margin="5,0,5,0"></Rectangle>
  82. <pdftools:CPDFPageTurningControl x:Name="CPDFPageTurningControl"></pdftools:CPDFPageTurningControl>
  83. <Rectangle Width="1" Fill="#AAAAAA" Margin="5,0,5,0"></Rectangle>
  84. <pdftools:CPDFScalingControl x:Name="CPDFScalingControl"></pdftools:CPDFScalingControl>
  85. <Rectangle Width="1" Fill="#AAAAAA" Margin="5,0,5,0"></Rectangle>
  86. <pdftools:CPDFBrowseModeControl x:Name="CPDFBrowseModeControl"></pdftools:CPDFBrowseModeControl>
  87. <Rectangle Width="1" Fill="#AAAAAA" Margin="5,0,5,0"></Rectangle>
  88. <pdftools:CPDFColorModeControl x:Name="CPDFColorModeControl"></pdftools:CPDFColorModeControl>
  89. <Rectangle Width="1" Fill="#AAAAAA" Margin="5,0,5,0"></Rectangle>
  90. <Button x:Name="PDFInfoButton" Height="30" Width="60" Click="PDFInfoButton_Click">
  91. <TextBlock Text="文档属性"></TextBlock>
  92. </Button>
  93. <Rectangle Width="1" Fill="#AAAAAA" Margin="5,0,5,0"></Rectangle>
  94. </StackPanel>
  95. <Border BorderBrush="{StaticResource color.border.normal}" BorderThickness="1"></Border>
  96. </Grid>
  97. </Grid>
  98. </Window>