BottomToolContent.xaml 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223
  1. <UserControl
  2. x:Class="PDF_Office.Views.BottomToolContent"
  3. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  4. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
  7. xmlns:local="clr-namespace:PDF_Office.Views"
  8. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  9. xmlns:prism="http://prismlibrary.com/"
  10. xmlns:viewmodels="clr-namespace:PDF_Office.ViewModels"
  11. d:DataContext="{d:DesignInstance Type=viewmodels:BottomToolContentViewModel}"
  12. d:DesignHeight="450"
  13. d:DesignWidth="1280"
  14. prism:ViewModelLocator.AutoWireViewModel="True"
  15. mc:Ignorable="d">
  16. <UserControl.Resources>
  17. <Style x:Key="Radion_ButtonStyle" TargetType="{x:Type RadioButton}">
  18. <Setter Property="Foreground" Value="Black" />
  19. <Setter Property="Background" Value="White" />
  20. <Setter Property="FontSize" Value="18" />
  21. <Setter Property="Cursor" Value="Hand" />
  22. <Setter Property="Margin" Value="0,0,10,10" />
  23. <Setter Property="Height" Value="32" />
  24. <Setter Property="Template">
  25. <Setter.Value>
  26. <ControlTemplate TargetType="{x:Type RadioButton}">
  27. <Border
  28. x:Name="fore"
  29. Background="White"
  30. BorderThickness="0"
  31. CornerRadius="0">
  32. <ContentPresenter
  33. x:Name="content"
  34. HorizontalAlignment="Center"
  35. VerticalAlignment="Center"
  36. Content="{TemplateBinding Content}" />
  37. </Border>
  38. <ControlTemplate.Triggers>
  39. <Trigger Property="IsChecked" Value="true">
  40. <Setter TargetName="fore" Property="Background" Value="#575757" />
  41. <Setter Property="Foreground" Value="White" />
  42. </Trigger>
  43. <Trigger Property="IsMouseOver" Value="True">
  44. <Setter TargetName="fore" Property="Background" Value="#575757" />
  45. <Setter Property="Foreground" Value="White" />
  46. </Trigger>
  47. </ControlTemplate.Triggers>
  48. </ControlTemplate>
  49. </Setter.Value>
  50. </Setter>
  51. </Style>
  52. </UserControl.Resources>
  53. <i:Interaction.Triggers>
  54. <i:EventTrigger EventName="Loaded">
  55. <prism:InvokeCommandAction Command="{Binding Load}" />
  56. </i:EventTrigger>
  57. </i:Interaction.Triggers>
  58. <Grid Height="32">
  59. <Grid.ColumnDefinitions>
  60. <ColumnDefinition Width="*" />
  61. <ColumnDefinition Width="auto" MinWidth="{Binding ElementName=StkPnlCenter, Path=ActualWidth}" />
  62. <ColumnDefinition MinWidth="{Binding ElementName=StkPnlRight, Path=ActualWidth}" />
  63. </Grid.ColumnDefinitions>
  64. <StackPanel
  65. Name="StkPnlCenter"
  66. Grid.Column="1"
  67. HorizontalAlignment="Center"
  68. Orientation="Horizontal">
  69. <Button
  70. Width="24"
  71. Height="24"
  72. Margin="4"
  73. Command="{Binding FirstPageCommand}">
  74. <Path
  75. HorizontalAlignment="Center"
  76. Data="M5.01864718,2 L5.01864718,14 L4,14 L4,2 L5.01864718,2 Z M11.2797077,2.64644661 L12,3.35355339 L7.2668015,8 L12,12.6464466 L11.2797077,13.3535534 L5.82632562,8 L11.2797077,2.64644661 Z"
  77. Fill="Black">
  78. <Path.RenderTransform>
  79. <TransformGroup>
  80. <TranslateTransform X="-2" />
  81. </TransformGroup>
  82. </Path.RenderTransform>
  83. </Path>
  84. </Button>
  85. <Button
  86. Width="24"
  87. Height="24"
  88. Margin="4"
  89. Command="{Binding PrePageCommand}">
  90. <Polygon Fill="Black" Points="14.25 5.45223214 13.5232733 4.75 8.25 9.84553571 2.97672673 4.75 2.25 5.45223214 8.25 11.25">
  91. <Polygon.RenderTransform>
  92. <TransformGroup>
  93. <TranslateTransform X="8.250000" Y="8.000000" />
  94. <ScaleTransform ScaleX="-1" ScaleY="1" />
  95. <RotateTransform Angle="90" />
  96. <TranslateTransform X="22.250000" Y="23.000000" />
  97. </TransformGroup>
  98. </Polygon.RenderTransform>
  99. </Polygon>
  100. </Button>
  101. <TextBox
  102. Width="48"
  103. Height="24"
  104. Padding="10,0,0,0"
  105. VerticalAlignment="Center"
  106. VerticalContentAlignment="Center"
  107. FontSize="12"
  108. InputMethod.IsInputMethodEnabled="False"
  109. Text="{Binding CurrentPage}">
  110. <i:Interaction.Triggers>
  111. <i:EventTrigger EventName="KeyDown">
  112. <i:InvokeCommandAction Command="{Binding PageTextKeyDownCommand}" PassEventArgsToCommand="True" />
  113. </i:EventTrigger>
  114. <i:EventTrigger EventName="PreviewKeyDown">
  115. <i:InvokeCommandAction Command="{Binding PageTextPreviewKeyDownCommand}" PassEventArgsToCommand="True" />
  116. </i:EventTrigger>
  117. </i:Interaction.Triggers>
  118. </TextBox>
  119. <TextBlock
  120. MinWidth="50"
  121. VerticalAlignment="Center"
  122. Text="{Binding PageCount, StringFormat=/{0}}" />
  123. <Button
  124. Width="24"
  125. Height="24"
  126. Margin="4"
  127. Command="{Binding NextPageCommand}">
  128. <Polygon Fill="Black" Points="14.25 5.45223214 13.5232733 4.75 8.25 9.84553571 2.97672673 4.75 2.25 5.45223214 8.25 11.25">
  129. <Polygon.RenderTransform>
  130. <TransformGroup>
  131. <TranslateTransform X="8.000000" Y="8.000000" />
  132. <ScaleTransform ScaleX="-1" ScaleY="1" />
  133. <RotateTransform Angle="-90" />
  134. <TranslateTransform X="-8.000000" Y="-10.000000" />
  135. </TransformGroup>
  136. </Polygon.RenderTransform>
  137. </Polygon>
  138. </Button>
  139. <Button
  140. Width="24"
  141. Height="24"
  142. Margin="4"
  143. Command="{Binding LastPageCommand}">
  144. <Path Data="M12.0252351,2 L12.0252351,14 L11.0252351,14 L11.0252351,2 L12.0252351,2 Z M4.6892629,2.64644661 L9.90771909,8 L4.6892629,13.3535534 L4,12.6464466 L8.52929737,8 L4,3.35355339 L4.6892629,2.64644661 Z" Fill="Black">
  145. <Path.RenderTransform>
  146. <TransformGroup>
  147. <TranslateTransform X="-3" />
  148. </TransformGroup>
  149. </Path.RenderTransform>
  150. </Path>
  151. </Button>
  152. </StackPanel>
  153. <StackPanel
  154. x:Name="StkPnlRight"
  155. Grid.Column="2"
  156. HorizontalAlignment="Right"
  157. Orientation="Horizontal">
  158. <ToggleButton
  159. Width="24"
  160. Height="24"
  161. Margin="4"
  162. Command="{Binding SetViewModeCommand}"
  163. IsChecked="{Binding IsContinue}">
  164. <Grid>
  165. <Polygon Fill="Black" Points="2 0 2 6 14 6 14 0 15 0 15 7 1 7 1 0" />
  166. <Path Data="M10.807106,9 L15,13.3928931 L15,16 L14,16 L14,14 L9.999999,14 L9.999,10 L2,10 L2,16 L1,16 L1,9 L10.807106,9 Z M13.237,13 L10.999,10.64 L10.999,13 L13.237,13 Z" Fill="Black" />
  167. </Grid>
  168. </ToggleButton>
  169. <Separator
  170. Width="1"
  171. Height="10"
  172. Style="{StaticResource {x:Static ToolBar.SeparatorStyleKey}}" />
  173. <RadioButton
  174. Width="24"
  175. Height="24"
  176. Margin="4"
  177. Command="{Binding SetViewModeCommand}"
  178. IsChecked="{Binding IsSingleView}"
  179. Style="{StaticResource Radion_ButtonStyle}">
  180. <Path Data="M9.80710597,0 L14,4.39289312 L14,16 L2,16 L2,0 L9.80710597,0 Z M8.999,1 L3,1 L3,15 L13,15 L13,4.999 L8.999999,5 L8.999,1 Z M12.236,3.999 L9.999,1.64 L9.999,4 L12.236,3.999 Z" Fill="Black" />
  181. </RadioButton>
  182. <RadioButton
  183. Width="24"
  184. Height="24"
  185. Margin="4"
  186. Command="{Binding SetViewModeCommand}"
  187. IsChecked="{Binding IsDoubleView}"
  188. Style="{StaticResource Radion_ButtonStyle}">
  189. <Path Data="M0,15 L0,1 L11.807106,1 L16,5.39289312 L16,15 L0,15 Z M7.5,2 L1,2 L1,14 L7.5,14 L7.5,2 Z M10.999,2 L8.5,2 L8.5,14 L15,14 L15,5.999 L10.999999,6 L10.999,2 Z M11.999,2.64 L11.999,5 L14.236,4.999 L11.999,2.64 Z" Fill="Black" />
  190. </RadioButton>
  191. <RadioButton
  192. Width="24"
  193. Height="24"
  194. Margin="4"
  195. Command="{Binding SetViewModeCommand}"
  196. IsChecked="{Binding IsBookMode}"
  197. Style="{StaticResource Radion_ButtonStyle}">
  198. <Path Data="M7,11 L7,16 L6,16 L6,12 L1,12 L1,16 L0,16 L0,11 L7,11 Z M16,11 L16,16 L15,16 L15,12 L10,12 L10,16 L9,16 L9,11 L16,11 Z M3.80710597,0 L7,3.39289312 L7,9 L0,9 L0,0 L3.80710597,0 Z M2.999,1 L1,1 L1,8 L6,8 L6,3.999 L2.999999,4 L2.999,1 Z M3.999,1.652 L3.999,3 L5.251,2.999 L3.999,1.652 Z" Fill="Black" />
  199. </RadioButton>
  200. <Separator
  201. Width="1"
  202. Height="10"
  203. Style="{StaticResource {x:Static ToolBar.SeparatorStyleKey}}" />
  204. <Button
  205. Width="24"
  206. Height="24"
  207. Margin="4" />
  208. <ToggleButton
  209. Width="24"
  210. Height="24"
  211. Margin="4" />
  212. <Control Width="80" />
  213. <Button
  214. Width="24"
  215. Height="24"
  216. Margin="4"
  217. Command="{Binding OpenFullCommand}">
  218. <Path Data="M15,1 L15,6 L14,6 L14,2.706 L2.706,14 L6,14 L6,15 L1,15 L1,10 L2,10 L2,13.292 L13.292,2 L10,2 L10,1 L15,1 Z" Fill="Black" />
  219. </Button>
  220. </StackPanel>
  221. </Grid>
  222. </UserControl>