PageTurningPreview.xaml 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. <UserControl
  2. x:Class="PDF_Master.CustomControl.PageTurningPreview"
  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:local="clr-namespace:PDF_Master.CustomControl"
  7. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  8. Width="212"
  9. Height="320"
  10. mc:Ignorable="d">
  11. <Border
  12. Width="212"
  13. Height="320"
  14. Background="{StaticResource color.sys.layout.mg}"
  15. CornerRadius="8">
  16. <StackPanel Height="320" Orientation="Vertical">
  17. <Border
  18. Width="180"
  19. Height="248"
  20. Margin="0,16,0,0"
  21. HorizontalAlignment="Center"
  22. VerticalAlignment="Top"
  23. Background="{StaticResource color.sys.layout.mg}">
  24. <Border
  25. HorizontalAlignment="Center"
  26. VerticalAlignment="Center"
  27. BorderBrush="{StaticResource color.sys.layout.divider}"
  28. BorderThickness="1"
  29. CornerRadius="{StaticResource border-radius.8}">
  30. <Grid>
  31. <Border
  32. Name="BorderImage"
  33. Background="White"
  34. CornerRadius="{StaticResource border-radius.8}" />
  35. <Image
  36. Name="Image"
  37. RenderOptions.BitmapScalingMode="HighQuality"
  38. UseLayoutRounding="True">
  39. <Image.OpacityMask>
  40. <VisualBrush Visual="{Binding ElementName=BorderImage}" />
  41. </Image.OpacityMask>
  42. </Image>
  43. </Grid>
  44. </Border>
  45. </Border>
  46. <StackPanel
  47. Grid.Row="1"
  48. Width="155"
  49. Margin="0,16,0,0"
  50. HorizontalAlignment="Center"
  51. VerticalAlignment="Bottom"
  52. Orientation="Horizontal">
  53. <Button
  54. Name="PrePage"
  55. Width="24"
  56. Height="24"
  57. HorizontalAlignment="Left"
  58. HorizontalContentAlignment="Center"
  59. VerticalContentAlignment="Center"
  60. Background="{StaticResource color.field.bg.def}"
  61. BorderBrush="{StaticResource color.field.border.norm}"
  62. Click="PrePage_Click"
  63. FontSize="16">
  64. <Path
  65. Width="24"
  66. Height="24"
  67. HorizontalAlignment="Center"
  68. VerticalAlignment="Center"
  69. Data="M10.0607 12.1L14.6303 7.53039L13.5696 6.46973L8.46967 11.5697C8.17678 11.8626 8.17678 12.3374 8.46967 12.6303L13.5696 17.7303L14.6303 16.6696L10.0607 12.1Z"
  70. Fill="#616469" />
  71. <Button.Template>
  72. <ControlTemplate TargetType="{x:Type Button}">
  73. <Border
  74. Background="{TemplateBinding Background}"
  75. BorderBrush="{TemplateBinding BorderBrush}"
  76. BorderThickness="1"
  77. CornerRadius="4">
  78. <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" />
  79. </Border>
  80. </ControlTemplate>
  81. </Button.Template>
  82. </Button>
  83. <TextBox
  84. x:Name="CurrentPage"
  85. Width="54"
  86. Height="24"
  87. Margin="8,0,8,0"
  88. Padding="8,0,8,0"
  89. HorizontalContentAlignment="Left"
  90. VerticalContentAlignment="Center"
  91. Background="{StaticResource color.field.bg.def}"
  92. BorderBrush="{StaticResource color.field.border.norm}"
  93. InputMethod.IsInputMethodEnabled="False"
  94. KeyDown="CurrentPage_KeyDown"
  95. LostFocus="CurrentPage_LostFocus"
  96. PreviewTextInput="CountTextBox_PreviewTextInput"
  97. Text="1">
  98. <TextBox.Resources>
  99. <Style TargetType="{x:Type Border}">
  100. <Setter Property="CornerRadius" Value="4" />
  101. </Style>
  102. </TextBox.Resources>
  103. </TextBox>
  104. <TextBlock
  105. Width="5"
  106. Margin="0,0,2,0"
  107. HorizontalAlignment="Left"
  108. VerticalAlignment="Center"
  109. Text="/" />
  110. <TextBlock
  111. x:Name="PageIndex"
  112. Width="30"
  113. VerticalAlignment="Center"
  114. Block.TextAlignment="Center" />
  115. <Button
  116. x:Name="NextPage"
  117. Width="24"
  118. Height="24"
  119. HorizontalContentAlignment="Center"
  120. VerticalContentAlignment="Center"
  121. Background="{StaticResource color.field.bg.def}"
  122. BorderBrush="{StaticResource color.field.border.norm}"
  123. Click="NextPage_Click"
  124. FontSize="16">
  125. <Path
  126. Width="24"
  127. Height="24"
  128. HorizontalAlignment="Center"
  129. VerticalAlignment="Center"
  130. Data="M13.9393 12.1L9.36972 7.53039L10.4304 6.46973L15.5303 11.5697C15.8232 11.8626 15.8232 12.3374 15.5303 12.6303L10.4304 17.7303L9.36972 16.6696L13.9393 12.1Z"
  131. Fill="#616469" />
  132. <Button.Template>
  133. <ControlTemplate TargetType="{x:Type Button}">
  134. <Border
  135. Background="{TemplateBinding Background}"
  136. BorderBrush="{TemplateBinding BorderBrush}"
  137. BorderThickness="1"
  138. CornerRadius="4">
  139. <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" />
  140. </Border>
  141. </ControlTemplate>
  142. </Button.Template>
  143. </Button>
  144. </StackPanel>
  145. </StackPanel>
  146. </Border>
  147. </UserControl>