Browse Source

compdfkit(win) - 补充Settings样式

liuaoran 1 year ago
parent
commit
c47902e0e4

+ 155 - 21
Demo/Examples/Compdfkit_Tools/Asset/Styles/ComboBoxStyle.xaml

@@ -1,7 +1,7 @@
 <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                      xmlns:theme="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero2"
                     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
-    <Style x:Key="FocusVisual">
+    <!--<Style x:Key="FocusVisual">
         <Setter Property="Control.Template">
             <Setter.Value>
                 <ControlTemplate>
@@ -259,26 +259,160 @@
                 <Setter Property="Canvas.Left" TargetName="opaqueRect" Value="{Binding HorizontalOffset, ElementName=DropDownScrollViewer}"/>
             </Trigger>
         </ControlTemplate.Triggers>
-    </ControlTemplate>
+    </ControlTemplate>-->
     <Style x:Key="ComboBoxStyle1" TargetType="{x:Type ComboBox}">
-        <Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual}"/>
-        <Setter Property="Background" Value="{StaticResource ComboBox.Static.Background}"/>
-        <Setter Property="BorderBrush" Value="{StaticResource ComboBox.Static.Border}"/>
-        <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.WindowTextBrushKey}}"/>
-        <Setter Property="BorderThickness" Value="1"/>
-        <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
-        <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
-        <Setter Property="Padding" Value="6,3,5,3"/>
-        <Setter Property="ScrollViewer.CanContentScroll" Value="true"/>
-        <Setter Property="ScrollViewer.PanningMode" Value="Both"/>
-        <Setter Property="Stylus.IsFlicksEnabled" Value="False"/>
-        <Setter Property="Template" Value="{StaticResource ComboBoxTemplate}"/>
-        <Style.Triggers>
-            <Trigger Property="IsEditable" Value="true">
-                <Setter Property="IsTabStop" Value="false"/>
-                <Setter Property="Padding" Value="2"/>
-                <Setter Property="Template" Value="{StaticResource ComboBoxEditableTemplate}"/>
-            </Trigger>
-        </Style.Triggers>
+        <Setter Property="Background" Value="White"/>
+        <Setter Property="ItemContainerStyle">
+            <Setter.Value>
+                <!--ComBoxItem-->
+                <Style TargetType="ComboBoxItem">
+                    <Setter Property="MinHeight" Value="32"></Setter>
+                    <Setter Property="MinWidth" Value="60"></Setter>
+                    <Setter Property="FontSize" Value="12"></Setter>
+                    <Setter Property="Template">
+                        <Setter.Value>
+                            <ControlTemplate TargetType="ComboBoxItem">
+                                <Border Name="Back" Background="Transparent">
+                                    <ContentPresenter VerticalAlignment="Center" HorizontalAlignment="Left" Margin="5,0,0,0"></ContentPresenter>
+                                </Border>
+                                <ControlTemplate.Triggers>
+                                    <Trigger Property="IsMouseOver" Value="True">
+                                        <Setter TargetName="Back" Property="Background" Value="LightGray"></Setter>
+                                    </Trigger>
+                                    <Trigger Property="IsHighlighted" Value="True">
+                                        <Setter TargetName="Back" Property="Background" Value="LightGray"></Setter>
+                                    </Trigger>
+                                </ControlTemplate.Triggers>
+                            </ControlTemplate>
+                        </Setter.Value>
+                    </Setter>
+                </Style>
+            </Setter.Value>
+        </Setter>
+        <Setter Property="Template">
+            <Setter.Value>
+                <ControlTemplate TargetType="{x:Type ComboBox}">
+                    <Border x:Name="comboBoxBorder" BorderThickness="1" BorderBrush="#AFAFAF" Background="{TemplateBinding Background}" >
+                        <Grid >
+                            <Grid.ColumnDefinitions>
+                                <ColumnDefinition Width="3*"/>
+                                <ColumnDefinition Width="*"/>
+                            </Grid.ColumnDefinitions>
+                            <Grid Grid.Column="0" x:Name="grid">
+                                <ToggleButton
+                                Width="{Binding ElementName=grid,Path=ActualWidth}"
+                                Height="{Binding ElementName=grid, Path=ActualHeight}"
+                                Content="{TemplateBinding Text}" VerticalAlignment="Center"
+                                HorizontalAlignment="Left" Margin="5,0,0,0"
+                                BorderThickness="0"
+                                Foreground="{TemplateBinding Foreground}"
+                                Background="{TemplateBinding Background}" 
+                                IsChecked="{Binding Path=IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" ClickMode="Press"
+                                >
+                                    <ToggleButton.Style >
+                                        <Style TargetType="ToggleButton">
+                                            <Setter Property="Background" Value="White"/>
+                                            <Setter Property="Template">
+                                                <Setter.Value>
+                                                    <ControlTemplate TargetType="ToggleButton">
+                                                        <Border   Background="{TemplateBinding Background}" BorderThickness="0"  >
+                                                            <TextBlock Foreground="{TemplateBinding Foreground}" Text="{TemplateBinding Content}" Margin="4 0 0 0"  HorizontalAlignment="Left" VerticalAlignment="Center"/>
+                                                        </Border>
+                                                    </ControlTemplate>
+                                                </Setter.Value>
+                                            </Setter>
+                                            <Style.Triggers>
+                                                <Trigger Property="IsMouseOver" Value="True">
+                                                    <Setter Property="Background" Value="White"/>
+                                                </Trigger>
+                                                <Trigger Property="IsMouseOver" Value="False">
+                                                    <Setter Property="Background" Value="White"/>
+                                                </Trigger>
+                                            </Style.Triggers>
+                                        </Style>
+                                    </ToggleButton.Style>
+                                </ToggleButton>
+                            </Grid>
+
+                            <Grid Grid.Column="1" >
+                                <ToggleButton IsChecked="{Binding Path=IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
+                                          Foreground="{TemplateBinding Foreground}"
+                                          ClickMode="Press">
+                                    <ToggleButton.Style>
+                                        <Style TargetType="ToggleButton">
+                                            <Setter Property="Background" Value="White"/>
+                                            <Setter Property="Template">
+                                                <Setter.Value>
+                                                    <ControlTemplate TargetType="ToggleButton">
+                                                        <Border Background="{TemplateBinding Background}" BorderThickness="{TemplateBinding BorderThickness}">
+                                                            <Grid>
+                                                                <Viewbox x:Name="ArrowVbx" Width="12" Height="12">
+                                                                    <Path Fill="#666666" Data="M9.95941,0.800781 L11.1998,1.88866 L5.9998,7.20078 L0.799805,1.88866 L2.0402,0.800781 L5.9998,4.8452 L9.95941,0.800781 Z"/>
+                                                                    <Viewbox.RenderTransform>
+                                                                        <TransformGroup>
+                                                                            <ScaleTransform/>
+                                                                            <SkewTransform/>
+                                                                            <RotateTransform CenterX="6" CenterY="4" Angle="0"/>
+                                                                            <TranslateTransform/>
+                                                                        </TransformGroup>
+                                                                    </Viewbox.RenderTransform>
+                                                                </Viewbox>
+                                                            </Grid>
+                                                        </Border>
+                                                        <ControlTemplate.Triggers>
+                                                            <EventTrigger RoutedEvent="Checked">
+                                                                <BeginStoryboard>
+                                                                    <Storyboard >
+                                                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="ArrowVbx" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)">
+                                                                            <EasingDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
+                                                                            <EasingDoubleKeyFrame KeyTime="00:00:00.2000000" Value="180"/>
+                                                                        </DoubleAnimationUsingKeyFrames>
+                                                                    </Storyboard>
+                                                                </BeginStoryboard>
+                                                            </EventTrigger>
+
+                                                            <EventTrigger RoutedEvent="Unchecked">
+                                                                <BeginStoryboard>
+                                                                    <Storyboard >
+                                                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="ArrowVbx" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)">
+                                                                            <EasingDoubleKeyFrame KeyTime="00:00:00" Value="180"/>
+                                                                            <EasingDoubleKeyFrame KeyTime="00:00:00.2000000" Value="0"/>
+                                                                        </DoubleAnimationUsingKeyFrames>
+                                                                    </Storyboard>
+                                                                </BeginStoryboard>
+                                                            </EventTrigger>
+                                                        </ControlTemplate.Triggers>
+                                                    </ControlTemplate>
+                                                </Setter.Value>
+                                            </Setter>
+                                        </Style>
+                                    </ToggleButton.Style>
+                                </ToggleButton>
+                            </Grid>
+                            <Popup IsOpen="{TemplateBinding IsDropDownOpen}" Placement="Bottom" x:Name="Popup" Focusable="False" AllowsTransparency="True" PopupAnimation="Slide">
+                                <Border CornerRadius="1" MaxHeight="{TemplateBinding MaxDropDownHeight}" MinWidth="{TemplateBinding ActualWidth}" x:Name="DropDown" SnapsToDevicePixels="True">
+                                    <Border.Effect>
+                                        <DropShadowEffect Color="Black" BlurRadius="4" ShadowDepth="0" Opacity="0.5"/>
+                                    </Border.Effect>
+                                    <ScrollViewer Margin="4,6,4,6" Style="{DynamicResource ScrollViewerStyle}" MaxHeight="{TemplateBinding MaxDropDownHeight}" SnapsToDevicePixels="True" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto" CanContentScroll="True">
+                                        <StackPanel IsItemsHost="True" KeyboardNavigation.DirectionalNavigation="Contained" Background="White"/>
+                                    </ScrollViewer>
+                                </Border>
+                            </Popup>
+                        </Grid>
+                    </Border>
+                    <ControlTemplate.Triggers>
+                        <Trigger Property="IsMouseOver" Value="True">
+                            <Setter TargetName="comboBoxBorder" Property="BorderBrush" Value="#388EF7"></Setter>
+                            <Setter Property="Effect">
+                                <Setter.Value>
+                                    <DropShadowEffect Color="#00BFFF" ShadowDepth="0" BlurRadius="5" Opacity="0.5"/>
+                                </Setter.Value>
+                            </Setter>
+                        </Trigger>
+                    </ControlTemplate.Triggers>
+                </ControlTemplate>
+            </Setter.Value>
+        </Setter>
     </Style>
 </ResourceDictionary>

+ 14 - 0
Demo/Examples/Compdfkit_Tools/Compdfkit_Tools.csproj

@@ -473,6 +473,12 @@
     <Compile Include="Security\Watermark\FileGridListWithPageRangeControl.xaml.cs">
       <DependentUpon>FileGridListWithPageRangeControl.xaml</DependentUpon>
     </Compile>
+    <Compile Include="Security\Watermark\PageRangeDialog.xaml.cs">
+      <DependentUpon>PageRangeDialog.xaml</DependentUpon>
+    </Compile>
+    <Compile Include="Security\Watermark\PreviewControl.xaml.cs">
+      <DependentUpon>PreviewControl.xaml</DependentUpon>
+    </Compile>
     <Compile Include="Security\Watermark\WatermarkListDialog.xaml.cs">
       <DependentUpon>WatermarkListDialog.xaml</DependentUpon>
     </Compile>
@@ -1008,6 +1014,14 @@
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
     </Page>
+    <Page Include="Security\Watermark\PageRangeDialog.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
+    <Page Include="Security\Watermark\PreviewControl.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
     <Page Include="Security\Watermark\WatermarkListDialog.xaml">
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>

+ 100 - 0
Demo/Examples/Compdfkit_Tools/Security/Watermark/PageRangeDialog.xaml

@@ -0,0 +1,100 @@
+<Window x:Class="Compdfkit_Tools.PDFControl.PageRangeDialog"
+        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+        xmlns:local="clr-namespace:Compdfkit_Tools.PDFControl"
+        mc:Ignorable="d"
+        ResizeMode="NoResize"
+        Title="Settings" Height="580" Width="704">
+    <Window.Resources>
+        <ResourceDictionary>
+            <Style x:Key="PageRangeRadioButtonStyle" TargetType="{x:Type RadioButton}">
+                <Setter Property="Template">
+                    <Setter.Value>
+                        <ControlTemplate TargetType="{x:Type RadioButton}">
+                            <Grid HorizontalAlignment="Left">
+                                <Grid.ColumnDefinitions>
+                                    <ColumnDefinition Width="32"></ColumnDefinition>
+                                    <ColumnDefinition></ColumnDefinition>
+                                </Grid.ColumnDefinitions>
+                                <Grid>
+                                    <Ellipse x:Name="radioEllipse"
+                                         Width="20"
+                                         Height="20"
+                                         Fill="White"
+                                         Stroke="{TemplateBinding BorderBrush}"
+                                         StrokeThickness="1"/>
+                                    <Ellipse x:Name="innerEllipse"
+                                         Width="14"
+                                         Height="14"
+                                         Fill="Black"
+                                         Opacity="0"/>
+                                </Grid>
+                                <Grid x:Name="textGd"  Grid.Column="1">
+                                    <ContentPresenter HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
+                                </Grid>
+                            </Grid>
+                            <ControlTemplate.Triggers>
+                                <Trigger Property="IsChecked" Value="True">
+                                    <Setter TargetName="innerEllipse" Property="Opacity" Value="1"></Setter>
+                                </Trigger>
+                                <Trigger Property="IsMouseOver" Value="True">
+                                    <Setter TargetName="radioEllipse" Property="Stroke" Value="DodgerBlue"></Setter>
+                                </Trigger>
+                            </ControlTemplate.Triggers>
+                        </ControlTemplate>
+                    </Setter.Value>
+                </Setter>
+            </Style>
+        </ResourceDictionary>
+    </Window.Resources>
+    <Grid Margin="24">
+        <Grid.RowDefinitions>
+            <RowDefinition></RowDefinition>
+            <RowDefinition Height="auto"></RowDefinition>
+        </Grid.RowDefinitions>
+        <Grid.ColumnDefinitions>
+            <ColumnDefinition Width="248"></ColumnDefinition>
+            <ColumnDefinition></ColumnDefinition>
+        </Grid.ColumnDefinitions>
+        <Grid>
+            <local:PreviewControl></local:PreviewControl>
+        </Grid>
+        <Grid Grid.Column="1">
+            <Border BorderThickness="1" BorderBrush="#33000000" Margin="10,10,0,0" Height="190" VerticalAlignment="Top">
+                <Grid Margin="10,20,10,0">
+                    <Grid.RowDefinitions>
+                        <RowDefinition></RowDefinition>
+                        <RowDefinition></RowDefinition>
+                        <RowDefinition></RowDefinition>
+                        <RowDefinition></RowDefinition>
+                    </Grid.RowDefinitions>
+                    <RadioButton Style="{StaticResource PageRangeRadioButtonStyle}" Margin="0,0,0,8" IsChecked="True">
+                        <TextBlock Text="All Pages" VerticalAlignment="Center" FontSize="14" FontFamily="Segoe UI"></TextBlock>
+                    </RadioButton>
+                    <RadioButton Grid.Row="1" Style="{StaticResource PageRangeRadioButtonStyle}" Margin="0,0,0,8">
+                        <TextBlock Text="Odd page only" VerticalAlignment="Center" FontSize="14" FontFamily="Segoe UI"></TextBlock>
+                    </RadioButton>
+                    <RadioButton Grid.Row="2" Style="{StaticResource PageRangeRadioButtonStyle}" Margin="0,0,0,8">
+                        <TextBlock Text="Even page only" VerticalAlignment="Center" FontSize="14" FontFamily="Segoe UI"></TextBlock>
+                    </RadioButton>
+                    <RadioButton Grid.Row="3" Style="{StaticResource PageRangeRadioButtonStyle}" Margin="0,0,0,8">
+                        <TextBlock Text="Custom Range" VerticalAlignment="Center" FontSize="14" FontFamily="Segoe UI"></TextBlock>
+                    </RadioButton>
+                </Grid>
+            </Border>
+            <TextBlock Text="Page Range" Margin="20,3,0,0" Background="#fff" Height="20" Width="75" HorizontalAlignment="Left" VerticalAlignment="Top" TextAlignment="Center" FontWeight="DemiBold" FontFamily="Segoe UI"></TextBlock>
+        </Grid>
+        <Grid Grid.Row="1" Grid.ColumnSpan="2">
+            <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="0,12,0,12">
+                <Button x:Name="ConfirmBtn" Height="32" Width="112" Margin="0,0,12,0" Click="ConfirmBtn_Click">
+                    <TextBlock Text="OK"></TextBlock>
+                </Button>
+                <Button x:Name="CancelBtn" Height="32" Width="112" Margin="0,0,24,0" Click="CancelBtn_Click">
+                    <TextBlock Text="Cancel"></TextBlock>
+                </Button>
+            </StackPanel>
+        </Grid>
+    </Grid>
+</Window>

+ 37 - 0
Demo/Examples/Compdfkit_Tools/Security/Watermark/PageRangeDialog.xaml.cs

@@ -0,0 +1,37 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Shapes;
+
+namespace Compdfkit_Tools.PDFControl
+{
+    /// <summary>
+    /// Interaction logic for PageRangeDialog.xaml
+    /// </summary>
+    public partial class PageRangeDialog : Window
+    {
+        public PageRangeDialog()
+        {
+            InitializeComponent();
+        }
+
+        private void ConfirmBtn_Click(object sender, RoutedEventArgs e)
+        {
+
+        }
+
+        private void CancelBtn_Click(object sender, RoutedEventArgs e)
+        {
+
+        }
+    }
+}

+ 98 - 0
Demo/Examples/Compdfkit_Tools/Security/Watermark/PreviewControl.xaml

@@ -0,0 +1,98 @@
+<UserControl x:Class="Compdfkit_Tools.PDFControl.PreviewControl"
+             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
+             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">
+    <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 />
+                            <ControlTemplate.Triggers>
+                                <Trigger Property="IsMouseOver" Value="True">
+                                    <Setter Property="Background" Value="#1a000000" />
+                                </Trigger>
+                                <Trigger Property="IsPressed" Value="True">
+                                    <Setter Property="Background" Value="#5a000000" />
+                                </Trigger>
+                            </ControlTemplate.Triggers>
+                        </ControlTemplate>
+                    </Setter.Value>
+                </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 />
+                            <ControlTemplate.Triggers>
+                                <Trigger Property="IsMouseOver" Value="True">
+                                    <Setter Property="Background" Value="#C1C1C1" />
+                                </Trigger>
+                                <Trigger Property="IsMouseOver" Value="False">
+                                    <Setter Property="Background" Value="#E1E1E1" />
+                                </Trigger>
+                                <Trigger Property="IsPressed" Value="True">
+                                    <Setter Property="Background" Value="#A1A1A1" />
+                                </Trigger>
+                            </ControlTemplate.Triggers>
+                        </ControlTemplate>
+                    </Setter.Value>
+                </Setter>
+            </Style>
+        </ResourceDictionary>
+    </UserControl.Resources>
+    <Grid>
+        <Grid.RowDefinitions>
+            <RowDefinition Height="auto"></RowDefinition>
+            <RowDefinition></RowDefinition>
+            <RowDefinition Height="auto"></RowDefinition>
+        </Grid.RowDefinitions>
+        <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" 
+              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" 
+              Fill="Black" />
+                </Button>
+            </StackPanel>
+        </Grid>
+        <Border Grid.Row="1" x:Name="ImageGd" Background="#1A000000" ClipToBounds="True" BorderThickness="1" BorderBrush="#000000">
+            <ScrollViewer x:Name="ImageSv" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto">
+                <Image x:Name="Image" Source="{Binding ImageSource}" Stretch="None" MouseLeftButtonDown="Image_MouseLeftButtonDown" MouseLeftButtonUp="Image_MouseLeftButtonUp" MouseMove="Image_MouseMove">
+                    <Image.LayoutTransform>
+                        <ScaleTransform ScaleX="{Binding Scale}" ScaleY="{Binding Scale}"></ScaleTransform>
+                    </Image.LayoutTransform>
+                </Image>
+            </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}">
+                <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>
+            <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}">
+                <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>
+        </StackPanel>
+    </Grid>
+</UserControl>

+ 43 - 0
Demo/Examples/Compdfkit_Tools/Security/Watermark/PreviewControl.xaml.cs

@@ -0,0 +1,43 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+
+namespace Compdfkit_Tools.PDFControl
+{
+    /// <summary>
+    /// Interaction logic for PreviewControl.xaml
+    /// </summary>
+    public partial class PreviewControl : UserControl
+    {
+        public PreviewControl()
+        {
+            InitializeComponent();
+        }
+
+        private void Image_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
+        {
+
+        }
+
+        private void Image_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
+        {
+
+        }
+
+        private void Image_MouseMove(object sender, MouseEventArgs e)
+        {
+
+        }
+    }
+}

+ 1 - 1
Demo/Examples/ContentEditor/MainWindow.xaml

@@ -135,7 +135,7 @@
 
                 </StackPanel>
 
-                <ComboBox Name="ViewComboBox" Width="120" Height="26" Grid.Column="1" HorizontalAlignment="Center" FontSize="14" Foreground="#001A4E" SelectionChanged="ComboBox_SelectionChanged"
+                <ComboBox Name="ViewComboBox" Width="140" Height="26" Grid.Column="1" HorizontalAlignment="Center" FontSize="12" Foreground="#001A4E" SelectionChanged="ComboBox_SelectionChanged"
                          Style="{StaticResource ComboBoxStyle1}" >
                     <ComboBoxItem IsSelected="True">Viewer</ComboBoxItem>
                     <ComboBoxItem>Content Edit</ComboBoxItem>

+ 1 - 1
Demo/Examples/DigitalSignature/MainWindow.xaml

@@ -119,7 +119,7 @@
 
                     <cpdftools:CPDFScalingControl x:Name="CPDFSaclingControl"></cpdftools:CPDFScalingControl>
                 </StackPanel>
-                <ComboBox Name="ModeComboBox" Style="{StaticResource ComboBoxStyle1}" Width="150" Height="26" Grid.Column="1" HorizontalAlignment="Center" FontSize="14" Foreground="#001A4E" SelectionChanged="ComboBox_SelectionChanged">
+                <ComboBox Name="ModeComboBox" Style="{StaticResource ComboBoxStyle1}" Width="150" Height="26" Grid.Column="1" HorizontalAlignment="Center" FontSize="12" Foreground="#001A4E" SelectionChanged="ComboBox_SelectionChanged">
                     <ComboBoxItem Tag="Viewer">Viewer</ComboBoxItem>
                     <ComboBoxItem Tag="Digital Signature" IsSelected="True">Digital Signature</ComboBoxItem>
                 </ComboBox>

+ 1 - 1
Demo/Examples/DocsEditor/MainWindow.xaml

@@ -159,7 +159,7 @@
                     </StackPanel>
                 </Grid>
 
-                <ComboBox Name="ViewComboBox" Width="120" Height="26" Grid.Column="1" HorizontalAlignment="Center" FontSize="14" Foreground="#001A4E"
+                <ComboBox Name="ViewComboBox" Width="140" Height="26" Grid.Column="1" HorizontalAlignment="Center" FontSize="12" Foreground="#001A4E"
                          Style="{StaticResource ComboBoxStyle1}" SelectionChanged="ViewComboBox_SelectionChanged">
                     <ComboBoxItem>Viewer</ComboBoxItem>
                     <ComboBoxItem  IsSelected="True">Page Edit</ComboBoxItem>

+ 1 - 1
Demo/Examples/Forms/MainWindow.xaml

@@ -119,7 +119,7 @@
                     <cpdftools:CPDFScalingControl x:Name="CPDFSaclingControl"></cpdftools:CPDFScalingControl>
                 </StackPanel>
 
-                <ComboBox Name="ModeComboBox" Style="{StaticResource ComboBoxStyle1}" Width="120" Height="26" Grid.Column="1" HorizontalAlignment="Center" FontSize="14" Foreground="#001A4E" SelectionChanged="ComboBox_SelectionChanged">
+                <ComboBox Name="ModeComboBox" Style="{StaticResource ComboBoxStyle1}" Width="140" Height="26" Grid.Column="1" HorizontalAlignment="Center" FontSize="12" Foreground="#001A4E" SelectionChanged="ComboBox_SelectionChanged">
                     <ComboBoxItem IsSelected="True" Tag="Viewer">Viewer</ComboBoxItem>
                     <ComboBoxItem Tag="Form">Form</ComboBoxItem>
                 </ComboBox>

+ 21 - 0
Demo/Examples/PDFViewer/App.config

@@ -1,6 +1,27 @@
 <?xml version="1.0" encoding="utf-8" ?>
 <configuration>
+    <configSections>
+        <sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
+            <section name="PDFViewer.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
+        </sectionGroup>
+    </configSections>
     <startup> 
         <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
     </startup>
+    <applicationSettings>
+        <PDFViewer.Properties.Settings>
+            <setting name="IsHighlightLinkArea" serializeAs="String">
+                <value>False</value>
+            </setting>
+            <setting name="IsHighlightFormArea" serializeAs="String">
+                <value>False</value>
+            </setting>
+            <setting name="DocumentAuthor" serializeAs="String">
+                <value>ComPDFKit</value>
+            </setting>
+            <setting name="Language" serializeAs="String">
+                <value>English</value>
+            </setting>
+        </PDFViewer.Properties.Settings>
+    </applicationSettings>
 </configuration>

+ 1 - 1
Demo/Examples/PDFViewer/MainPage.xaml

@@ -173,7 +173,7 @@
                     <cpdftools:CPDFScalingControl x:Name="CPDFSaclingControl"  Visibility="{Binding NotDocsEditorVisible, Mode=OneWay}"></cpdftools:CPDFScalingControl>
                 </StackPanel>
 
-                <ComboBox Name="ModeComboBox" Style="{StaticResource ComboBoxStyle1}" Width="130" Height="26" Grid.Column="1" HorizontalAlignment="Center" FontSize="14" Foreground="#001A4E" SelectionChanged="ComboBox_SelectionChanged">
+                <ComboBox Name="ModeComboBox" Style="{StaticResource ComboBoxStyle1}" Width="150" Height="26" Grid.Column="1" HorizontalAlignment="Center" FontSize="12" Foreground="#001A4E" HorizontalContentAlignment="Center" SelectionChanged="ComboBox_SelectionChanged">
                     <ComboBoxItem Tag="Viewer">Viewer</ComboBoxItem>
                     <ComboBoxItem Tag="Annotation">Annotation</ComboBoxItem>
                     <ComboBoxItem Tag="Form">Form</ComboBoxItem>

+ 3 - 1
Demo/Examples/PDFViewer/MainWindow.xaml.cs

@@ -419,7 +419,9 @@ namespace PDFViewer
 
         private void SettingsBtn_Click(object sender, RoutedEventArgs e)
         {
-
+            SettingsDialog settingsDialog = new SettingsDialog();
+            settingsDialog.Owner = this;
+            settingsDialog.ShowDialog();
         }
 
 

+ 7 - 0
Demo/Examples/PDFViewer/PDFViewer.csproj

@@ -74,6 +74,9 @@
       <Generator>MSBuild:Compile</Generator>
       <SubType>Designer</SubType>
     </ApplicationDefinition>
+    <Compile Include="SettingsDialog.xaml.cs">
+      <DependentUpon>SettingsDialog.xaml</DependentUpon>
+    </Compile>
     <Page Include="MainPage.xaml">
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
@@ -93,6 +96,10 @@
       <DependentUpon>MainWindow.xaml</DependentUpon>
       <SubType>Code</SubType>
     </Compile>
+    <Page Include="SettingsDialog.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
   </ItemGroup>
   <ItemGroup>
     <Compile Include="Properties\AssemblyInfo.cs">

+ 2 - 2
Demo/Examples/PDFViewer/Properties/AssemblyInfo.cs

@@ -24,5 +24,5 @@ using System.Windows;
     ResourceDictionaryLocation.SourceAssembly 
 )]
 
-[assembly: AssemblyVersion("1.10.0.0")]
-[assembly: AssemblyFileVersion("1.10.0.0")]
+[assembly: AssemblyVersion("1.11.0.0")]
+[assembly: AssemblyFileVersion("1.11.0.0")]

+ 41 - 5
Demo/Examples/PDFViewer/Properties/Settings.Designer.cs

@@ -1,10 +1,10 @@
 //------------------------------------------------------------------------------
 // <auto-generated>
-//     此代码由工具生成。
-//     运行时版本:4.0.30319.42000
+//     This code was generated by a tool.
+//     Runtime Version:4.0.30319.42000
 //
-//     对此文件的更改可能会导致不正确的行为,并且如果
-//     重新生成代码,这些更改将会丢失。
+//     Changes to this file may cause incorrect behavior and will be lost if
+//     the code is regenerated.
 // </auto-generated>
 //------------------------------------------------------------------------------
 
@@ -12,7 +12,7 @@ namespace PDFViewer.Properties {
     
     
     [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
-    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.5.0.0")]
+    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.7.0.0")]
     internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
         
         private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
@@ -22,5 +22,41 @@ namespace PDFViewer.Properties {
                 return defaultInstance;
             }
         }
+        
+        [global::System.Configuration.ApplicationScopedSettingAttribute()]
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        [global::System.Configuration.DefaultSettingValueAttribute("False")]
+        public bool IsHighlightLinkArea {
+            get {
+                return ((bool)(this["IsHighlightLinkArea"]));
+            }
+        }
+        
+        [global::System.Configuration.ApplicationScopedSettingAttribute()]
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        [global::System.Configuration.DefaultSettingValueAttribute("False")]
+        public bool IsHighlightFormArea {
+            get {
+                return ((bool)(this["IsHighlightFormArea"]));
+            }
+        }
+        
+        [global::System.Configuration.ApplicationScopedSettingAttribute()]
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        [global::System.Configuration.DefaultSettingValueAttribute("ComPDFKit")]
+        public string DocumentAuthor {
+            get {
+                return ((string)(this["DocumentAuthor"]));
+            }
+        }
+        
+        [global::System.Configuration.ApplicationScopedSettingAttribute()]
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        [global::System.Configuration.DefaultSettingValueAttribute("English")]
+        public string Language {
+            get {
+                return ((string)(this["Language"]));
+            }
+        }
     }
 }

+ 16 - 5
Demo/Examples/PDFViewer/Properties/Settings.settings

@@ -1,7 +1,18 @@
 <?xml version='1.0' encoding='utf-8'?>
-<SettingsFile xmlns="uri:settings" CurrentProfile="(Default)">
-  <Profiles>
-    <Profile Name="(Default)" />
-  </Profiles>
-  <Settings />
+<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="PDFViewer.Properties" GeneratedClassName="Settings">
+  <Profiles />
+  <Settings>
+    <Setting Name="IsHighlightLinkArea" Type="System.Boolean" Scope="Application">
+      <Value Profile="(Default)">False</Value>
+    </Setting>
+    <Setting Name="IsHighlightFormArea" Type="System.Boolean" Scope="Application">
+      <Value Profile="(Default)">False</Value>
+    </Setting>
+    <Setting Name="DocumentAuthor" Type="System.String" Scope="Application">
+      <Value Profile="(Default)">ComPDFKit</Value>
+    </Setting>
+    <Setting Name="Language" Type="System.String" Scope="Application">
+      <Value Profile="(Default)">English</Value>
+    </Setting>
+  </Settings>
 </SettingsFile>

+ 168 - 0
Demo/Examples/PDFViewer/SettingsDialog.xaml

@@ -0,0 +1,168 @@
+<Window x:Class="PDFViewer.SettingsDialog"
+        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+        xmlns:local="clr-namespace:PDFViewer"
+        mc:Ignorable="d"
+        Title="Settings" Height="613" Width="418"
+        ResizeMode="NoResize">
+    <Window.Resources>
+        <ResourceDictionary>
+            
+            <ResourceDictionary.MergedDictionaries> 
+                <ResourceDictionary Source="pack://application:,,,/Compdfkit_Tools;component/Asset/Styles/ComboBoxStyle.xaml"></ResourceDictionary>
+            </ResourceDictionary.MergedDictionaries>
+            <DropShadowEffect x:Key="HoverThumbEffect" BlurRadius="5" ShadowDepth="0" Opacity="0.5" Color="RoyalBlue"/>
+
+            <SolidColorBrush x:Key="SecundaryBackgroundColor" Color="#ffffff"></SolidColorBrush>
+            <SolidColorBrush x:Key="PrimaryBlueColor" Color="#1772b4"></SolidColorBrush>
+            <SolidColorBrush x:Key="PrimaryGrayColor" Color="#606060"></SolidColorBrush>
+            <SolidColorBrush x:Key="SecundaryBlueColor" Color="#2983bb"></SolidColorBrush>
+            <SolidColorBrush x:Key="SecundaryGrayColor" Color="#cecece"></SolidColorBrush>
+            <SolidColorBrush x:Key="TertiaryBlueColor" Color="#c2d1fc"></SolidColorBrush>
+
+            <Style x:Key="SliderSwitchToggleButtonStyle" TargetType="ToggleButton">
+                <Setter Property="Background" Value="{StaticResource SecundaryGrayColor}" />
+                <Setter Property="BorderBrush" Value="{StaticResource PrimaryGrayColor }" />
+                <Setter Property="Height" Value="20" />
+                <Setter Property="Width" Value="35" />
+                <Setter Property="MaxHeight" Value="20" />
+                <Setter Property="MaxWidth" Value="35" />
+                <Setter Property="Template">
+                    <Setter.Value>
+                        <ControlTemplate TargetType="{x:Type ToggleButton}">
+                            <Grid>
+                                <Border x:Name="Border"
+                        Background="{TemplateBinding Background}"
+                        CornerRadius="7"
+                        Height="14"
+                        Width="35"
+                        VerticalAlignment="Center"
+                        HorizontalAlignment="Center">
+                                    <Border.Effect>
+                                        <DropShadowEffect ShadowDepth="0.5" Opacity="0.3" />
+                                    </Border.Effect>
+                                </Border>
+                                <Ellipse x:Name="Ellipse"
+                        Fill="{DynamicResource SecundaryBackgroundColor}"
+                        Height="20"
+                        Width="20"
+                        Stroke="{TemplateBinding BorderBrush}"
+                        StrokeThickness="1"
+                        HorizontalAlignment="Left">
+                                    <Ellipse.Effect>
+                                        <DropShadowEffect ShadowDepth="0.5" Opacity="0.3" />
+                                    </Ellipse.Effect>
+                                </Ellipse>
+                            </Grid>
+                            <ControlTemplate.Triggers>
+                                <Trigger Property="IsChecked" Value="True">
+                                    <Setter TargetName="Ellipse" Property="Stroke" Value="{DynamicResource PrimaryBlueColor}" />
+                                    <Setter TargetName="Border" Property="Background" Value="{DynamicResource TertiaryBlueColor}" />
+                                    <Setter TargetName="Ellipse" Property="Margin" Value="15 0 0 0" />
+
+                                </Trigger>
+                                <Trigger Property="IsMouseOver" Value="True">
+                                    <Setter TargetName="Ellipse" Property="Stroke" Value="{DynamicResource PrimaryBlueColor}" />
+                                    <Setter Property="Effect" Value="{StaticResource HoverThumbEffect}"></Setter>
+                                </Trigger>
+                            </ControlTemplate.Triggers>
+                        </ControlTemplate>
+                    </Setter.Value>
+                </Setter>
+            </Style>
+            <Style x:Key="UnderlinedButtonStyle" TargetType="Button">
+                <Setter Property="Background" Value="Transparent"/>
+                <Setter Property="Foreground" Value="#1460F3"/> 
+                <Setter Property="BorderBrush" Value="Transparent"/>
+                <Setter Property="FontFamily" Value="Segoe UI"></Setter>
+                <Setter Property="Template">
+                    <Setter.Value>
+                        <ControlTemplate TargetType="Button">
+                            <Grid>
+                                <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1" CornerRadius="4"/>
+                                <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
+                                <Rectangle Fill="#1460F3" Height="1" VerticalAlignment="Bottom"/>
+                            </Grid>
+                            <ControlTemplate.Triggers>
+                                <Trigger Property="IsMouseOver" Value="True">
+                                    <Setter Property="Cursor" Value="Hand" />
+                                </Trigger>
+                            </ControlTemplate.Triggers>
+                        </ControlTemplate>
+                    </Setter.Value>
+                </Setter>
+            </Style>
+        </ResourceDictionary> 
+    </Window.Resources>
+    <Grid Margin="24,0,24,0">
+        <Grid.RowDefinitions>
+            <RowDefinition Height="196"></RowDefinition>
+            <RowDefinition Height="68"></RowDefinition>
+            <RowDefinition Height="224"></RowDefinition>
+            <RowDefinition Height="84"></RowDefinition>
+        </Grid.RowDefinitions>
+        <StackPanel Margin="0,0,0,0">
+            <TextBlock Text="Global setting" FontSize="14" FontWeight="DemiBold" FontFamily="Segoe UI" Margin="0,0,0,8"></TextBlock>
+            <Grid Margin="0,0,0,8" Height="32">
+                <TextBlock Text="Highlight Link area" HorizontalAlignment="Left" VerticalAlignment="Center"></TextBlock>
+                <ToggleButton Style="{StaticResource SliderSwitchToggleButtonStyle}" Height="32" HorizontalAlignment="Right"></ToggleButton>
+            </Grid>
+            <Grid Margin="0,0,0,8" Height="32">
+                <TextBlock Text="Highlight Form area" HorizontalAlignment="Left" VerticalAlignment="Center"></TextBlock>
+                <ToggleButton Style="{StaticResource SliderSwitchToggleButtonStyle}" Height="32" HorizontalAlignment="Right"></ToggleButton>
+            </Grid>
+            <Grid Margin="0,0,0,8" Height="32">
+                <TextBlock Text="Document Author" HorizontalAlignment="Left" VerticalAlignment="Center"></TextBlock>
+                <TextBox HorizontalAlignment="Right" Width="130"></TextBox>
+            </Grid>
+            <Grid Height="32">
+                <TextBlock Text="Document Author" HorizontalAlignment="Left" VerticalAlignment="Center"></TextBlock>
+                <ComboBox Style="{StaticResource ComboBoxStyle1}" HorizontalAlignment="Right" Width="130"></ComboBox>
+            </Grid>
+        </StackPanel>
+        <StackPanel Grid.Row="1">
+            <TextBlock Text="SDK Information" FontSize="14" FontWeight="DemiBold" FontFamily="Segoe UI" Margin="0,0,0,8"></TextBlock>
+            <Grid Margin="0,0,0,8" Height="32">
+                <TextBlock Text="Highlight Link area" HorizontalAlignment="Left" VerticalAlignment="Center"></TextBlock>
+                <TextBlock HorizontalAlignment="Right"  VerticalAlignment="Center" Text="V1.11.0"></TextBlock>
+            </Grid>
+        </StackPanel>
+        <StackPanel Grid.Row="2">
+            <TextBlock Text="Company Information" FontSize="14" FontWeight="DemiBold" FontFamily="Segoe UI" Margin="0,0,0,8"></TextBlock>
+            <Grid Margin="0,0,0,8" Height="20">
+                <TextBlock Text="Website" HorizontalAlignment="Left" VerticalAlignment="Center"></TextBlock>
+                <Button Style="{StaticResource UnderlinedButtonStyle}" HorizontalAlignment="Right" Content="https://www.compdf.com/"></Button>
+            </Grid>
+            <Grid Margin="0,0,0,8" Height="20">
+                <TextBlock Text="About ComPDFKit" HorizontalAlignment="Left" VerticalAlignment="Center"></TextBlock>
+                <Button Style="{StaticResource UnderlinedButtonStyle}" Content="https://www.compdf.com/company/about" HorizontalAlignment="Right"></Button>
+            </Grid>
+            <Grid Margin="0,0,0,8" Height="20">
+                <TextBlock Text="Contact Sales" HorizontalAlignment="Left" VerticalAlignment="Center"></TextBlock>
+                <Button Style="{StaticResource UnderlinedButtonStyle}" HorizontalAlignment="Right" Content="https://www.compdf.com/contact-sales"></Button>
+            </Grid>
+            <Grid Margin="0,0,0,8" Height="20">
+                <TextBlock Text="Email Address" HorizontalAlignment="Left" VerticalAlignment="Center"></TextBlock>
+                <Button Style="{StaticResource UnderlinedButtonStyle}" HorizontalAlignment="Right" Content="support@compdf.com"></Button>
+            </Grid>
+            <Grid Margin="0,0,0,8" Height="20">
+                <TextBlock Text="Technical Support" HorizontalAlignment="Left" VerticalAlignment="Center"></TextBlock>
+                <Button Style="{StaticResource UnderlinedButtonStyle}" HorizontalAlignment="Right" Content="https://www.compdf.com/support"></Button>
+            </Grid>
+        </StackPanel>
+        <Grid Grid.Row="3" Margin="0,0,0,40">
+            <Grid.RowDefinitions>
+                <RowDefinition Height="auto"></RowDefinition>
+                <RowDefinition></RowDefinition>
+            </Grid.RowDefinitions>
+            <TextBlock Text="@ 2014-2023 PDF Technologies, Inc. All Rights Reserved." HorizontalAlignment="Center" Foreground="#999999" FontFamily="Segoe UI"></TextBlock>
+            <StackPanel HorizontalAlignment="Center" VerticalAlignment="Bottom" Grid.Row="1" Orientation="Horizontal">
+                <Button Style="{StaticResource UnderlinedButtonStyle}" Content="Privacy Policy"></Button>
+                <Rectangle Width="1" Height="15" Fill="#1A000000" Margin="10,0,10,0"></Rectangle>
+                <Button Style="{StaticResource UnderlinedButtonStyle}" Content="Terms of Service"></Button>
+            </StackPanel>
+        </Grid>
+    </Grid>
+</Window>

+ 27 - 0
Demo/Examples/PDFViewer/SettingsDialog.xaml.cs

@@ -0,0 +1,27 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Shapes;
+
+namespace PDFViewer
+{
+    /// <summary>
+    /// Interaction logic for SettingsDialog.xaml
+    /// </summary>
+    public partial class SettingsDialog : Window
+    {
+        public SettingsDialog()
+        {
+            InitializeComponent();
+        }
+    }
+}

+ 13 - 8
Demo/Examples/Samples/PDFToImage/CS/PDFToImage.cs

@@ -16,10 +16,10 @@ namespace PDFToImageTest
     {
         private static string parentPath =
                     Path.GetDirectoryName(Path.GetDirectoryName(Path.GetDirectoryName(System.IO.Directory.GetCurrentDirectory())));
-        private static string outputPath = parentPath + "\\Output\\CS";
+        private static string outputPath = parentPath + @"\Output\CS";
         static void Main(string[] args)
         {
-            Console.WriteLine("Running PDFToImage test sample…\r\n");
+            Console.WriteLine("Running PDFToImage test sample…" + Environment.NewLine);
 
             SDKLicenseHelper.LicenseVerify();
             CPDFDocument document = CPDFDocument.InitWithFilePath("CommonFivePage.pdf");
@@ -30,7 +30,7 @@ namespace PDFToImageTest
             }
 
             PDFPageToImage(document);
-
+            PDFToImage2(document);
             Console.WriteLine("--------------------");
             Console.WriteLine("Done!");
             Console.WriteLine("--------------------");
@@ -38,6 +38,11 @@ namespace PDFToImageTest
             Console.ReadLine();
         }
 
+        private static void PDFToImage2(CPDFDocument document)
+        {
+            document.PdfToImage("1", outputPath);
+        }
+
         static private void SaveWriteableBitmapAsPng(WriteableBitmap writeableBitmap, string fileName)
         {
             using (FileStream stream = new FileStream(fileName, FileMode.Create))
@@ -45,7 +50,7 @@ namespace PDFToImageTest
                 PngBitmapEncoder encoder = new PngBitmapEncoder();
                 encoder.Frames.Add(BitmapFrame.Create(writeableBitmap));
                 encoder.Save(stream);
-            } 
+            }
         }
 
         /// <summary>
@@ -58,13 +63,13 @@ namespace PDFToImageTest
                 CPDFPage pdfPage = document.PageAtIndex(i, true);
                 Size pageSize = document.GetPageSize(0);
                 Rect pageRect = new Rect(0, 0, (int)(pageSize.Width / 72.0 * 96), (int)(pageSize.Height / 72.0 * 96));
-                byte[] bmpData = new byte[(int)(pageRect.Width * pageRect.Height * (96 / 72.0)  * (96 / 72.0) * 4)];
-                pdfPage.RenderPageBitmapWithMatrix((float)(96/72.0), pageRect, 0xFFFFFFFF, bmpData, 0, true);
+                byte[] bmpData = new byte[(int)(pageRect.Width * pageRect.Height * (96 / 72.0) * (96 / 72.0) * 4)];
+                pdfPage.RenderPageBitmapWithMatrix((float)(96 / 72.0), pageRect, 0xFFFFFFFF, bmpData, 0, true);
 
                 WriteableBitmap writeableBitmap = new WriteableBitmap((int)pageRect.Width, (int)pageRect.Height, 96, 96, PixelFormats.Bgra32, null);
-    
+
                 writeableBitmap.WritePixels(new Int32Rect(0, 0, (int)pageRect.Width, (int)pageRect.Height), bmpData, writeableBitmap.BackBufferStride, 0);
-                var path = outputPath + "//PDFToImageTest" + i + ".png";
+                var path = outputPath + @"\PDFToImageTest" + i + ".png";
                 SaveWriteableBitmapAsPng(writeableBitmap, path);
                 Console.WriteLine("Png image saved in {0}", path);
             }