CPDFViewModeUI.xaml 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200
  1. <UserControl x:Class="ComPDFKit.Controls.PDFControlUI.CPDFViewModeUI"
  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="350" d:DesignWidth="350">
  9. <UserControl.Resources>
  10. <ResourceDictionary>
  11. <ResourceDictionary.MergedDictionaries>
  12. <ResourceDictionary Source="../../../Asset/Styles/ButtonStyle.xaml"></ResourceDictionary>
  13. <ResourceDictionary Source="../../../Asset/Styles/ToggleButtonStyle.xaml"></ResourceDictionary>
  14. </ResourceDictionary.MergedDictionaries>
  15. <common:CommonResourceConverter x:Key="CommonResourceConverter"/>
  16. </ResourceDictionary>
  17. </UserControl.Resources>
  18. <Grid>
  19. <StackPanel Orientation="Horizontal" VerticalAlignment="Center" Visibility="Collapsed">
  20. <RadioButton x:Name="ContinuousRadioButton" Tag="Continuous" GroupName="Continuous" IsChecked="True" Click="ContinuousRadioButton_Click">
  21. <TextBlock Text="Continous"></TextBlock>
  22. <RadioButton.ToolTip>
  23. <ToolTip Content="Continuous"></ToolTip>
  24. </RadioButton.ToolTip>
  25. </RadioButton>
  26. <RadioButton x:Name="DiscontinuousRadioButton" Tag="Discontinuous" GroupName="Continuous" Click="ContinuousRadioButton_Click">
  27. <TextBlock Text="Discontinous"></TextBlock>
  28. <RadioButton.ToolTip>
  29. <ToolTip Content="Discontinuous"></ToolTip>
  30. </RadioButton.ToolTip>
  31. </RadioButton>
  32. <Rectangle Margin="10,0,10,0" Width="1" Fill="Black"></Rectangle>
  33. <RadioButton x:Name="SinglePageModeRadioButton" GroupName="ViewMode" Tag="Single" IsChecked="True" Checked="ViewModeRadioButton_Checked">
  34. <RadioButton.ToolTip>
  35. <ToolTip Content="{Binding Converter={StaticResource CommonResourceConverter},ConverterParameter=Tooltip_SinglePage}"></ToolTip>
  36. </RadioButton.ToolTip>
  37. </RadioButton>
  38. <RadioButton x:Name="DoublePageModeRadioButton" GroupName="ViewMode" Tag="Double" Grid.Row="1" Checked="ViewModeRadioButton_Checked">
  39. <RadioButton.ToolTip>
  40. <ToolTip Content="{Binding Converter={StaticResource CommonResourceConverter},ConverterParameter=Tooltip_DoublePage}"></ToolTip>
  41. </RadioButton.ToolTip>
  42. </RadioButton>
  43. <RadioButton x:Name="BookModeRadioButton" GroupName="ViewMode" Grid.Row="2" Tag="Book" Checked="ViewModeRadioButton_Checked">
  44. <TextBlock Text="{Binding Converter={StaticResource CommonResourceConverter},ConverterParameter=Tooltip_CoverMode}"></TextBlock>
  45. <RadioButton.ToolTip>
  46. <ToolTip Content="Cover Mode"></ToolTip>
  47. </RadioButton.ToolTip>
  48. </RadioButton>
  49. </StackPanel>
  50. <Grid>
  51. <Grid.RowDefinitions>
  52. <RowDefinition Height="auto"></RowDefinition>
  53. <RowDefinition Height="auto"></RowDefinition>
  54. <RowDefinition Height="auto"></RowDefinition>
  55. </Grid.RowDefinitions>
  56. <Border BorderThickness="0,0,0,1" BorderBrush="#EDEDED" Padding="0,0,0,7.5" Name="SplitContainer">
  57. <Grid>
  58. <Grid.RowDefinitions>
  59. <RowDefinition Height="auto"></RowDefinition>
  60. <RowDefinition Height="auto"></RowDefinition>
  61. </Grid.RowDefinitions>
  62. <TextBlock Foreground="#43474D" FontSize="14" LineHeight="16" Margin="0,0,0,18"
  63. Text="{Binding Converter={StaticResource CommonResourceConverter},ConverterParameter=Title_SplitView}"></TextBlock>
  64. <StackPanel Orientation="Horizontal" Grid.Row="1">
  65. <ToggleButton Name="VerticalBtn" Width="50" Height="36" BorderThickness="0" Style="{StaticResource RoundToggleButtonStyle}"
  66. Background="Transparent" Click="VerticalBtn_Click">
  67. <ToggleButton.Content>
  68. <Path Name="VerticalPath" Fill="#999999" >
  69. <Path.Data>
  70. M20.5 0H0.5V14H20.5V0ZM4.34628 8.75L4.6731 7.73649H6.05023L6.37455 8.75H6.96333L5.66353 5H5.05979L3.76 8.75H4.34628ZM5.90054 7.26871H4.82279L5.33921
  71. 5.65748H5.38162L5.90054 7.26871ZM10 13V1H11V13H10ZM16.0694 7.69231C16.0694 8.34979 15.6078 8.75 14.8394 8.75H13.36V5H14.807C15.4831 5 15.8897
  72. 5.35863 15.8897 5.93295V5.93815C15.8897 6.32796 15.6128 6.67879 15.2585 6.74116V6.78534C15.745 6.83992 16.0694 7.19854 16.0694 7.68711V7.69231ZM13.9188
  73. 6.59563H14.5825C15.0764 6.59563 15.3334 6.40333 15.3334 6.0395V6.0343C15.3334 5.68087 15.0914 5.47557 14.6773 5.47557H13.9188V6.59563ZM14.7272
  74. 8.27443H13.9188V7.04002H14.6947C15.2211 7.04002 15.498 7.24792 15.498 7.65073V7.65593C15.498 8.05873 15.2311 8.27443 14.7272 8.27443Z
  75. </Path.Data>
  76. </Path>
  77. </ToggleButton.Content>
  78. <ToggleButton.ToolTip>
  79. <ToolTip Content="{Binding Converter={StaticResource CommonResourceConverter},ConverterParameter=Tooltip_Vertical}"></ToolTip>
  80. </ToggleButton.ToolTip>
  81. </ToggleButton>
  82. <ToggleButton Name="HorizonBtn" Width="50" Height="36" BorderThickness="0" Margin="5,0,0,0" Style="{StaticResource RoundToggleButtonStyle}"
  83. Background="Transparent" Click="HorizonBtn_Click">
  84. <ToggleButton.Content>
  85. <Path Name="HorizonPath" Fill="#999999">
  86. <Path.Data>
  87. M0.5 0V16H17.5V0H0.5ZM1 8.5H17V7.5H1V8.5ZM8.45114 5.23649L8.11071 6.25H7.5L8.85395 2.5H9.48285L10.8368 6.25H10.2235L9.88565
  88. 5.23649H8.45114ZM8.60707 4.76871H9.72973L9.18919 3.15748H9.14501L8.60707 4.76871ZM10.8222 12.3923C10.8222 13.0498 10.3415 13.45
  89. 9.54106 13.45H8V9.70001H9.50728C10.2115 9.70001 10.6351 10.0586 10.6351 10.633V10.6382C10.6351 11.028 10.3467 11.3788 9.97765
  90. 11.4412V11.4854C10.4844 11.5399 10.8222 11.8986 10.8222 12.3871V12.3923ZM8.58212 11.2956H9.27339C9.78794 11.2956 10.0556 11.1033
  91. 10.0556 10.7395V10.7343C10.0556 10.3809 9.80353 10.1756 9.37214 10.1756H8.58212V11.2956ZM9.42412 12.9744H8.58212V11.74H9.39033C9.93867
  92. 11.74 10.2271 11.9479 10.2271 12.3507V12.3559C10.2271 12.7587 9.94906 12.9744 9.42412 12.9744Z
  93. </Path.Data>
  94. </Path>
  95. </ToggleButton.Content>
  96. <ToggleButton.ToolTip>
  97. <ToolTip Content="{Binding Converter={StaticResource CommonResourceConverter},ConverterParameter=Tooltip_Horizontal}"></ToolTip>
  98. </ToggleButton.ToolTip>
  99. </ToggleButton>
  100. </StackPanel>
  101. </Grid>
  102. </Border>
  103. <Border Name="DisplayContainer" Grid.Row="1" Margin="0,30,0,0">
  104. <Grid>
  105. <Grid.RowDefinitions>
  106. <RowDefinition Height="auto"></RowDefinition>
  107. <RowDefinition Height="auto"></RowDefinition>
  108. </Grid.RowDefinitions>
  109. <TextBlock Foreground="#43474D" FontSize="14" LineHeight="16" Margin="0,0,0,18"
  110. Text="{Binding Converter={StaticResource CommonResourceConverter},ConverterParameter=Title_DisplayMode}"></TextBlock>
  111. <StackPanel Orientation="Horizontal" Grid.Row="1">
  112. <ToggleButton Name="SingleViewBtn" Width="50" Height="36" BorderThickness="0" Style="{StaticResource RoundToggleButtonStyle}" Background="Transparent"
  113. Click="SingleViewBtn_Click">
  114. <ToggleButton.Content>
  115. <Path Name="SingleViewPath" Fill="#999999">
  116. <Path.Data>
  117. M0 0H8L12 4.2V16H0V0Z
  118. </Path.Data>
  119. </Path>
  120. </ToggleButton.Content>
  121. <ToggleButton.ToolTip>
  122. <ToolTip Content="{Binding Converter={StaticResource CommonResourceConverter},ConverterParameter=Tooltip_SinglePage}"></ToolTip>
  123. </ToggleButton.ToolTip>
  124. </ToggleButton>
  125. <ToggleButton Name="DoubleViewBtn" Width="50" Height="36" BorderThickness="0" Margin="5,0,0,0" Style="{StaticResource RoundToggleButtonStyle}" Background="Transparent"
  126. Click="DoubleViewBtn_Click">
  127. <ToggleButton.Content>
  128. <Path Name="DoubleViewPath" Fill="#999999">
  129. <Path.Data>
  130. M11 5H1V19H11V5ZM19 5H13V19H23V9.2L19 5Z
  131. </Path.Data>
  132. </Path>
  133. </ToggleButton.Content>
  134. <ToggleButton.ToolTip>
  135. <ToolTip Content="{Binding Converter={StaticResource CommonResourceConverter},ConverterParameter=Tooltip_DoublePage}"></ToolTip>
  136. </ToggleButton.ToolTip>
  137. </ToggleButton>
  138. <ToggleButton Name="BookViewBtn" Width="50" Height="36" BorderThickness="0" Margin="5,0,0,0" Style="{StaticResource RoundToggleButtonStyle}" Background="Transparent"
  139. Click="BookViewBtn_Click">
  140. <ToggleButton.Content>
  141. <Path Name="BookViewPath" Fill="#999999">
  142. <Path.Data>
  143. <GeometryGroup>
  144. <PathGeometry>M11 15H1V21H11V15ZM23 15H13V21H23V15Z</PathGeometry>
  145. <PathGeometry>M1 3H8L11 6.2V13H1V3Z</PathGeometry>
  146. </GeometryGroup>
  147. </Path.Data>
  148. </Path>
  149. </ToggleButton.Content>
  150. <ToggleButton.ToolTip>
  151. <ToolTip Content="{Binding Converter={StaticResource CommonResourceConverter},ConverterParameter=Tooltip_CoverMode}"></ToolTip>
  152. </ToggleButton.ToolTip>
  153. </ToggleButton>
  154. </StackPanel>
  155. </Grid>
  156. </Border>
  157. <Border Grid.Row="2" Margin="0,30,0,0" BorderThickness="0,1,0,1" BorderBrush="#EDEDED" Padding="0,26,0,26">
  158. <Grid>
  159. <Grid.RowDefinitions>
  160. <RowDefinition Height="auto"></RowDefinition>
  161. <RowDefinition Height="auto"></RowDefinition>
  162. </Grid.RowDefinitions>
  163. <Grid>
  164. <Grid.ColumnDefinitions>
  165. <ColumnDefinition Width="*"></ColumnDefinition>
  166. <ColumnDefinition Width="auto"></ColumnDefinition>
  167. </Grid.ColumnDefinitions>
  168. <TextBlock FontSize="14" Foreground="#43474D"
  169. Text="{Binding Converter={StaticResource CommonResourceConverter},ConverterParameter=Toggle_Continuous}"></TextBlock>
  170. <ToggleButton Name="ContinuePageBtn" Style="{StaticResource ToggleButtonSwitchStyle}" Margin="0,0,33,0" Grid.Column="1" Width="40" BorderThickness="0"
  171. Click="ContinuePageBtn_Click"></ToggleButton>
  172. </Grid>
  173. <Grid Grid.Row="1" x:Name="CropContainer" Visibility="Visible">
  174. <Grid.ColumnDefinitions>
  175. <ColumnDefinition Width="*"></ColumnDefinition>
  176. <ColumnDefinition Width="auto"></ColumnDefinition>
  177. </Grid.ColumnDefinitions>
  178. <TextBlock FontSize="14" Foreground="#43474D" Margin="0,24,0,0"
  179. Text="{Binding Converter={StaticResource CommonResourceConverter},ConverterParameter=Toggle_Crop}"></TextBlock>
  180. <ToggleButton Name="CropModeBtn" Style="{StaticResource ToggleButtonSwitchStyle}" Margin="0,24,33,0" Grid.Column="1" Width="40" BorderThickness="0"
  181. Click="CropModeBtn_Click"></ToggleButton>
  182. </Grid>
  183. </Grid>
  184. </Border>
  185. </Grid>
  186. </Grid>
  187. </UserControl>