|
@@ -5,24 +5,25 @@
|
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
|
xmlns:local="clr-namespace:Compdfkit_Tools.PDFControl"
|
|
|
mc:Ignorable="d"
|
|
|
- d:DesignHeight="449" d:DesignWidth="248">
|
|
|
+ d:DesignHeight="449" d:DesignWidth="248" Loaded="UserControl_Loaded">
|
|
|
<UserControl.Resources>
|
|
|
<ResourceDictionary>
|
|
|
<ResourceDictionary.MergedDictionaries>
|
|
|
</ResourceDictionary.MergedDictionaries>
|
|
|
<Style x:Key="TransparentButtonStyle" TargetType="{x:Type Button}">
|
|
|
- <Setter Property="Background" Value="Transparent" />
|
|
|
<Setter Property="BorderThickness" Value="0" />
|
|
|
<Setter Property="Template">
|
|
|
<Setter.Value>
|
|
|
<ControlTemplate TargetType="Button">
|
|
|
- <ContentPresenter />
|
|
|
+ <Border Name="border">
|
|
|
+ <ContentPresenter />
|
|
|
+ </Border>
|
|
|
<ControlTemplate.Triggers>
|
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
|
- <Setter Property="Background" Value="#1a000000" />
|
|
|
+ <Setter TargetName="border" Property="Background" Value="#1a000000" />
|
|
|
</Trigger>
|
|
|
<Trigger Property="IsPressed" Value="True">
|
|
|
- <Setter Property="Background" Value="#5a000000" />
|
|
|
+ <Setter TargetName="border" Property="Background" Value="#5a000000" />
|
|
|
</Trigger>
|
|
|
</ControlTemplate.Triggers>
|
|
|
</ControlTemplate>
|
|
@@ -30,21 +31,19 @@
|
|
|
</Setter>
|
|
|
</Style>
|
|
|
<Style x:Key="PageButtonStyle" TargetType="{x:Type Button}">
|
|
|
- <Setter Property="Background" Value="#E1E1E1"></Setter>
|
|
|
<Setter Property="BorderThickness" Value="0"></Setter>
|
|
|
<Setter Property="Template">
|
|
|
<Setter.Value>
|
|
|
<ControlTemplate TargetType="Button">
|
|
|
- <ContentPresenter />
|
|
|
+ <Border Name="border" Background="#E1E1E1">
|
|
|
+ <ContentPresenter />
|
|
|
+ </Border>
|
|
|
<ControlTemplate.Triggers>
|
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
|
- <Setter Property="Background" Value="#C1C1C1" />
|
|
|
- </Trigger>
|
|
|
- <Trigger Property="IsMouseOver" Value="False">
|
|
|
- <Setter Property="Background" Value="#E1E1E1" />
|
|
|
- </Trigger>
|
|
|
+ <Setter TargetName="border" Property="Background" Value="#C1C1C1" />
|
|
|
+ </Trigger>
|
|
|
<Trigger Property="IsPressed" Value="True">
|
|
|
- <Setter Property="Background" Value="#A1A1A1" />
|
|
|
+ <Setter TargetName="border" Property="Background" Value="#A1A1A1" />
|
|
|
</Trigger>
|
|
|
</ControlTemplate.Triggers>
|
|
|
</ControlTemplate>
|
|
@@ -62,12 +61,12 @@
|
|
|
<Grid Margin="0,0,0,10">
|
|
|
<TextBlock Text="Preview" FontWeight="DemiBold" FontFamily="Segoe UI" FontSize="14"></TextBlock>
|
|
|
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Center">
|
|
|
- <Button Style="{StaticResource TransparentButtonStyle}" Margin="0,0,10,0">
|
|
|
- <Path Data="M0,6.5 C0,2.91015 2.91015,0 6.5,0 C10.0899,0 13,2.91015 13,6.5 C13,8.12212 12.4058,9.60545 11.4232,10.7442 L15.5,14.821 L14.821,15.5 L10.7442,11.4232 C9.60545,12.4058 8.12212,13 6.5,13 C2.91015,13 0,10.0899 0,6.5 Z M12,6.5 C12,3.46243 9.53757,1 6.5,1 C3.46243,1 1,3.46243 1,6.5 C1,9.53757 3.46243,12 6.5,12 C9.53757,12 12,9.53757 12,6.5 Z M10,6 V7 H3 V6 H10 Z"
|
|
|
+ <Button Height="20" Width="20" Style="{StaticResource TransparentButtonStyle}" Margin="0,0,10,0">
|
|
|
+ <Path HorizontalAlignment="Center" VerticalAlignment="Center" Data="M0,6.5 C0,2.91015 2.91015,0 6.5,0 C10.0899,0 13,2.91015 13,6.5 C13,8.12212 12.4058,9.60545 11.4232,10.7442 L15.5,14.821 L14.821,15.5 L10.7442,11.4232 C9.60545,12.4058 8.12212,13 6.5,13 C2.91015,13 0,10.0899 0,6.5 Z M12,6.5 C12,3.46243 9.53757,1 6.5,1 C3.46243,1 1,3.46243 1,6.5 C1,9.53757 3.46243,12 6.5,12 C9.53757,12 12,9.53757 12,6.5 Z M10,6 V7 H3 V6 H10 Z"
|
|
|
Fill="Black" />
|
|
|
</Button>
|
|
|
- <Button Style="{StaticResource TransparentButtonStyle}">
|
|
|
- <Path Data="M6.5 0C2.91015 0 0 2.91015 0 6.5C0 10.0899 2.91015 13 6.5 13C8.12212 13 9.60545 12.4058 10.7442 11.4232L14.821 15.5L15.5 14.821L11.4232 10.7442C12.4058 9.60545 13 8.12212 13 6.5C13 2.91015 10.0899 0 6.5 0ZM6.5 1C9.53757 1 12 3.46243 12 6.5C12 9.53757 9.53757 12 6.5 12C3.46243 12 1 9.53757 1 6.5C1 3.46243 3.46243 1 6.5 1ZM10 6H7V3H6V6H3V7H6V10H7V7H10V6Z"
|
|
|
+ <Button Height="20" Width="20" Style="{StaticResource TransparentButtonStyle}">
|
|
|
+ <Path HorizontalAlignment="Center" VerticalAlignment="Center" Data="M6.5 0C2.91015 0 0 2.91015 0 6.5C0 10.0899 2.91015 13 6.5 13C8.12212 13 9.60545 12.4058 10.7442 11.4232L14.821 15.5L15.5 14.821L11.4232 10.7442C12.4058 9.60545 13 8.12212 13 6.5C13 2.91015 10.0899 0 6.5 0ZM6.5 1C9.53757 1 12 3.46243 12 6.5C12 9.53757 9.53757 12 6.5 12C3.46243 12 1 9.53757 1 6.5C1 3.46243 3.46243 1 6.5 1ZM10 6H7V3H6V6H3V7H6V10H7V7H10V6Z"
|
|
|
Fill="Black" />
|
|
|
</Button>
|
|
|
</StackPanel>
|
|
@@ -82,14 +81,14 @@
|
|
|
</ScrollViewer>
|
|
|
</Border>
|
|
|
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Grid.Row="2" Margin="0,8,0,0">
|
|
|
- <Button x:Name="PrePageBtn" Height="28" Width="28" Margin="0,0,16,0" Style="{StaticResource PageButtonStyle}">
|
|
|
+ <Button x:Name="PrePageBtn" Height="28" Width="28" Margin="0,0,16,0" Style="{StaticResource PageButtonStyle}" Click="PageBtn_Click">
|
|
|
<Path Height="16" Width="16" Data="M11.2978 14L12 13.2733L6.90446 8L12 2.72673L11.2978 2L5.5 8L11.2978 14Z"
|
|
|
Fill="Black" />
|
|
|
</Button>
|
|
|
- <TextBox Height="32" Width="48" Margin="0,0,8,0"></TextBox>
|
|
|
+ <TextBox x:Name="CurrentIndexTxt" Text="{Binding CurrentIndex, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}" Height="32" Width="48" Margin="0,0,8,0" PreviewTextInput="CurrentIndexTxt_PreviewTextInput" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" InputMethod.IsInputMethodEnabled="False" CommandManager.CanExecute="CurrentIndexTxt_CanExecute"></TextBox>
|
|
|
<TextBlock Text="/" FontSize="14" VerticalAlignment="Center" FontFamily="Segoe UI"></TextBlock>
|
|
|
- <TextBlock Text="{Binding SumPage}" Margin="5,0,0,0" FontSize="14" VerticalAlignment="Center" FontFamily="Segoe UI"></TextBlock>
|
|
|
- <Button x:Name="NextPageBtn" Height="28" Width="28" Margin="16,0,0,0" Style="{StaticResource PageButtonStyle}">
|
|
|
+ <TextBlock Text="{Binding PageCount}" Margin="5,0,0,0" FontSize="14" VerticalAlignment="Center" FontFamily="Segoe UI"></TextBlock>
|
|
|
+ <Button x:Name="NextPageBtn" Height="28" Width="28" Margin="16,0,0,0" Style="{StaticResource PageButtonStyle}" Click="PageBtn_Click">
|
|
|
<Path Height="16" Width="16" Data="M6.20223 14L5.5 13.2733L10.5955 8L5.5 2.72673L6.20223 2L12 8L6.20223 14Z"
|
|
|
Fill="Black" />
|
|
|
</Button>
|