PageTurningPreview.xaml 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  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. Click="PrePage_Click"
  61. FontSize="16"
  62. Style="{StaticResource btn.selector}">
  63. <Path
  64. Width="24"
  65. Height="24"
  66. HorizontalAlignment="Center"
  67. VerticalAlignment="Center"
  68. 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"
  69. Fill="{Binding RelativeSource={RelativeSource AncestorType={x:Type Button}}, Path=Foreground}" />
  70. </Button>
  71. <TextBox
  72. x:Name="CurrentPage"
  73. Width="54"
  74. Height="24"
  75. Margin="8,0,8,0"
  76. Padding="8,0,8,0"
  77. HorizontalContentAlignment="Left"
  78. VerticalContentAlignment="Center"
  79. Background="{StaticResource color.field.bg.def}"
  80. BorderBrush="{StaticResource color.field.border.norm}"
  81. InputMethod.IsInputMethodEnabled="False"
  82. KeyDown="CurrentPage_KeyDown"
  83. LostFocus="CurrentPage_LostFocus"
  84. PreviewTextInput="CountTextBox_PreviewTextInput"
  85. Text="1">
  86. <TextBox.Resources>
  87. <Style TargetType="{x:Type Border}">
  88. <Setter Property="CornerRadius" Value="4" />
  89. </Style>
  90. </TextBox.Resources>
  91. </TextBox>
  92. <TextBlock
  93. Width="5"
  94. Margin="0,0,2,0"
  95. HorizontalAlignment="Left"
  96. VerticalAlignment="Center"
  97. Text="/" />
  98. <TextBlock
  99. x:Name="PageIndex"
  100. Width="30"
  101. VerticalAlignment="Center"
  102. Block.TextAlignment="Center" />
  103. <Button
  104. x:Name="NextPage"
  105. Width="24"
  106. Height="24"
  107. HorizontalContentAlignment="Center"
  108. VerticalContentAlignment="Center"
  109. Click="NextPage_Click"
  110. FontSize="16"
  111. Style="{StaticResource btn.selector}">
  112. <Path
  113. Width="24"
  114. Height="24"
  115. HorizontalAlignment="Center"
  116. VerticalAlignment="Center"
  117. 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"
  118. Fill="{Binding RelativeSource={RelativeSource AncestorType={x:Type Button}}, Path=Foreground}" />
  119. </Button>
  120. </StackPanel>
  121. </StackPanel>
  122. </Border>
  123. </UserControl>