MainWindow.xaml 6.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  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. </StackPanel>
  59. <!--工具栏展开-->
  60. <Border Name="BotaToolContainer" Grid.Column="1" BorderThickness="0,0,1,0" BorderBrush="Gray" Visibility="Collapsed"></Border>
  61. <!--PDFViewer-->
  62. <Border Grid.Column="2" x:Name="PDFGrid" Background="{StaticResource color.bg.mainpage}"> </Border>
  63. <!--右侧面板-->
  64. <Grid Grid.Column="3" Visibility="Hidden"></Grid>
  65. </Grid>
  66. <!--底部工具栏-->
  67. <Grid Grid.Row="2" Background="#FFFFFF">
  68. <StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
  69. <Rectangle Width="1" Fill="#AAAAAA" Margin="5,0,5,0"></Rectangle>
  70. <pdftools:CPDFPageTurningControl x:Name="CPDFPageTurningControl"></pdftools:CPDFPageTurningControl>
  71. <Rectangle Width="1" Fill="#AAAAAA" Margin="5,0,5,0"></Rectangle>
  72. <pdftools:CPDFScalingControl x:Name="CPDFScalingControl"></pdftools:CPDFScalingControl>
  73. <Rectangle Width="1" Fill="#AAAAAA" Margin="5,0,5,0"></Rectangle>
  74. <pdftools:CPDFBrowseModeControl x:Name="CPDFBrowseModeControl"></pdftools:CPDFBrowseModeControl>
  75. <Rectangle Width="1" Fill="#AAAAAA" Margin="5,0,5,0"></Rectangle>
  76. <pdftools:CPDFColorModeControl x:Name="CPDFColorModeControl"></pdftools:CPDFColorModeControl>
  77. <Rectangle Width="1" Fill="#AAAAAA" Margin="5,0,5,0"></Rectangle>
  78. <Button x:Name="PDFInfoButton" Height="30" Width="60" Click="PDFInfoButton_Click">
  79. <TextBlock Text="文档属性"></TextBlock>
  80. </Button>
  81. <Rectangle Width="1" Fill="#AAAAAA" Margin="5,0,5,0"></Rectangle>
  82. </StackPanel>
  83. <Border BorderBrush="{StaticResource color.border.normal}" BorderThickness="1"></Border>
  84. </Grid>
  85. </Grid>
  86. </Window>