PageTurningPreview.xaml 5.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <UserControl x:Class="PDF_Master.CustomControl.PageTurningPreview"
  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:local="clr-namespace:PDF_Master.CustomControl"
  7. mc:Ignorable="d"
  8. Height="320" Width="212">
  9. <Border Width="212" Height="320" Background="{StaticResource color.sys.layout.mg}" CornerRadius="8">
  10. <StackPanel Orientation="Vertical" Height="320">
  11. <Border Margin="0,16,0,0" HorizontalAlignment="Center" VerticalAlignment="Top" Background="{StaticResource color.sys.layout.mg}" Height="248" Width="180">
  12. <Border HorizontalAlignment="Center" VerticalAlignment="Center" CornerRadius="{StaticResource border-radius.8}" BorderBrush="{StaticResource color.sys.layout.divider}" BorderThickness="1">
  13. <Grid>
  14. <Border
  15. Name="BorderImage"
  16. Background="White"
  17. CornerRadius="{StaticResource border-radius.8}" />
  18. <Image
  19. Name="Image"
  20. RenderOptions.BitmapScalingMode="HighQuality"
  21. UseLayoutRounding="True">
  22. <Image.OpacityMask>
  23. <VisualBrush Visual="{Binding ElementName=BorderImage}" />
  24. </Image.OpacityMask>
  25. </Image>
  26. </Grid>
  27. </Border>
  28. </Border>
  29. <StackPanel Orientation="Horizontal" Grid.Row="1" HorizontalAlignment="Center" VerticalAlignment="Bottom" Margin="0,16,0,0" Width="155">
  30. <Button Name="PrePage" Width="24" Click="PrePage_Click" Height="24" HorizontalAlignment="Left" FontSize="16" BorderBrush="{StaticResource color.field.border.norm}" Background="{StaticResource color.field.bg.def}" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" >
  31. <Path Data="M8.11144 11.2499L10.4311 8.93029L9.37043 7.86963L5.77045 11.4696C5.47756 11.7625 5.47756 12.2374 5.77045 12.5303L9.37043 16.1302L10.4311 15.0696L8.11144 12.7499H19.5008V11.2499H8.11144Z" Fill="#616469" Width="13.95" Height="8.28" Stretch="Fill" />
  32. <Button.Template>
  33. <ControlTemplate TargetType="{x:Type Button}">
  34. <Border BorderThickness="1" CornerRadius="4" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}">
  35. <ContentPresenter VerticalAlignment="Center" HorizontalAlignment="Center"/>
  36. </Border>
  37. </ControlTemplate>
  38. </Button.Template>
  39. </Button>
  40. <TextBox x:Name="CurrentPage" Width="54" Height="24" HorizontalContentAlignment="Left" VerticalContentAlignment="Center" Margin="8,0,8,0" Text="1" InputMethod.IsInputMethodEnabled="False" PreviewTextInput="CountTextBox_PreviewTextInput" Padding="8,0,8,0" KeyDown="CurrentPage_KeyDown" Background="{StaticResource color.field.bg.def}" BorderBrush="{StaticResource color.field.border.norm}" LostFocus="CurrentPage_LostFocus">
  41. <TextBox.Resources>
  42. <Style TargetType="{x:Type Border}">
  43. <Setter Property="CornerRadius" Value="4"/>
  44. </Style>
  45. </TextBox.Resources>
  46. </TextBox>
  47. <TextBlock Text="/" Margin="0,0,2,0" Width="5" HorizontalAlignment="Left" VerticalAlignment="Center"></TextBlock>
  48. <TextBlock x:Name="PageIndex" VerticalAlignment="Center" Block.TextAlignment="Center" Width="30" />
  49. <Button x:Name="NextPage" Click="NextPage_Click" Width="24" Height="24" FontSize="16" Background="{StaticResource color.field.bg.def}" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" BorderBrush="{StaticResource color.field.border.norm}">
  50. <Path Data="M11.8893 4.24992L0.5 4.24992V5.74992L11.8893 5.74992L9.56967 8.06958L10.6303 9.13024L14.2303 5.53026C14.5232 5.23737 14.5232 4.7625 14.2303 4.4696L10.6303 0.869629L9.56967 1.93029L11.8893 4.24992Z" Fill="#616469" Width="13.95" Height="8.28" Stretch="Fill"/>
  51. <Button.Template>
  52. <ControlTemplate TargetType="{x:Type Button}">
  53. <Border BorderThickness="1" CornerRadius="4" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}">
  54. <ContentPresenter VerticalAlignment="Center" HorizontalAlignment="Center"/>
  55. </Border>
  56. </ControlTemplate>
  57. </Button.Template>
  58. </Button>
  59. </StackPanel>
  60. </StackPanel>
  61. </Border>
  62. </UserControl>