PageTurningPreview.xaml 4.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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" CornerRadius="4" BorderBrush="{StaticResource color.sys.layout.divider}" BorderThickness="1">
  12. <Viewbox>
  13. <Image Name="Image" Height="248" Width="180" >
  14. </Image>
  15. </Viewbox>
  16. </Border>
  17. <StackPanel Orientation="Horizontal" Grid.Row="1" HorizontalAlignment="Center" VerticalAlignment="Bottom" Margin="0,16,0,0" Width="155">
  18. <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" >
  19. <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" />
  20. <Button.Template>
  21. <ControlTemplate TargetType="{x:Type Button}">
  22. <Border BorderThickness="1" CornerRadius="4" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}">
  23. <ContentPresenter VerticalAlignment="Center" HorizontalAlignment="Center"/>
  24. </Border>
  25. </ControlTemplate>
  26. </Button.Template>
  27. </Button>
  28. <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">
  29. <TextBox.Resources>
  30. <Style TargetType="{x:Type Border}">
  31. <Setter Property="CornerRadius" Value="4"/>
  32. </Style>
  33. </TextBox.Resources>
  34. </TextBox>
  35. <TextBlock Text="/" Margin="0,0,2,0" Width="5" HorizontalAlignment="Left" VerticalAlignment="Center"></TextBlock>
  36. <TextBlock x:Name="PageIndex" VerticalAlignment="Center" Block.TextAlignment="Center" Width="30" />
  37. <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}">
  38. <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"/>
  39. <Button.Template>
  40. <ControlTemplate TargetType="{x:Type Button}">
  41. <Border BorderThickness="1" CornerRadius="4" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}">
  42. <ContentPresenter VerticalAlignment="Center" HorizontalAlignment="Center"/>
  43. </Border>
  44. </ControlTemplate>
  45. </Button.Template>
  46. </Button>
  47. </StackPanel>
  48. </StackPanel>
  49. </Border>
  50. </UserControl>