Browse Source

Merge branch 'dev' into practice2

OYXH\oyxh 2 years ago
parent
commit
8053f00fa0
40 changed files with 2909 additions and 156 deletions
  1. 479 0
      PDF Office/App.xaml
  2. 2 1
      PDF Office/App.xaml.cs
  3. BIN
      PDF Office/ComPDFKit.Viewer.dll
  4. 4 0
      PDF Office/CustomControl/CompositeControl/ColorContent.xaml.cs
  5. 3 0
      PDF Office/CustomControl/CompositeControl/ColorSubContent.xaml.cs
  6. 8 10
      PDF Office/CustomControl/CompositeControl/SlidComboControl.xaml
  7. 58 19
      PDF Office/CustomControl/CompositeControl/SlidComboControl.xaml.cs
  8. 1 1
      PDF Office/CustomControl/DialogContent.cs
  9. 253 0
      PDF Office/CustomControl/ImageRadioButton .cs
  10. 2 2
      PDF Office/CustomControl/PathButton.cs
  11. 355 0
      PDF Office/CustomControl/PathRadioButton.cs
  12. 2 0
      PDF Office/Model/DialogNames.cs
  13. 48 0
      PDF Office/PDF Office.csproj
  14. BIN
      PDF Office/Resources/PropertyPanel/EmptyAnnot.png
  15. 92 7
      PDF Office/Styles/CustomBtnStyle.xaml
  16. 115 0
      PDF Office/Styles/ImageRadioButtonDictionary.xaml
  17. 126 0
      PDF Office/Styles/PathRadioButtonDictionary.xaml
  18. 1 0
      PDF Office/Styles/TabControlStyle.xaml
  19. 1 1
      PDF Office/Styles/ToggleButton.xaml
  20. 10 11
      PDF Office/Themes/Generic.xaml
  21. 82 0
      PDF Office/ViewModels/Form/EditPresetColorsDialogViewModel.cs
  22. 44 12
      PDF Office/ViewModels/Form/FormBaseVM.cs
  23. 29 6
      PDF Office/ViewModels/Form/FormsToolContentViewModel.cs
  24. 349 13
      PDF Office/ViewModels/Form/TextFieldPropertyViewModel.cs
  25. 12 0
      PDF Office/Views/Dialog/Redaction/MarkSettingDialog.xaml
  26. 28 0
      PDF Office/Views/Dialog/Redaction/MarkSettingDialog.xaml.cs
  27. 61 0
      PDF Office/Views/Dialog/Redaction/PageMarkDialog.xaml
  28. 28 0
      PDF Office/Views/Dialog/Redaction/PageMarkDialog.xaml.cs
  29. 80 0
      PDF Office/Views/Dialog/Redaction/RepeatMarkDialog.xaml
  30. 28 0
      PDF Office/Views/Dialog/Redaction/RepeatMarkDialog.xaml.cs
  31. 101 0
      PDF Office/Views/Form/EditPresetColorsDialog.xaml
  32. 70 0
      PDF Office/Views/Form/EditPresetColorsDialog.xaml.cs
  33. 12 0
      PDF Office/Views/Form/EmptyFormProperty.xaml
  34. 28 0
      PDF Office/Views/Form/EmptyFormProperty.xaml.cs
  35. 318 32
      PDF Office/Views/Form/TextFieldProperty.xaml
  36. 15 1
      PDF Office/Views/Form/TextFieldProperty.xaml.cs
  37. 57 24
      PDF Office/Views/PropertyPanel/AnnotPanel/DynamicPropertyDialog.xaml
  38. 3 3
      PDF Office/Views/PropertyPanel/PDFEdit/TextEditProperty.xaml
  39. 1 10
      PDF Office/Views/PropertyPanel/PropertyPanelContent.xaml
  40. 3 3
      PDF Office/Views/ViewContent.xaml

+ 479 - 0
PDF Office/App.xaml

@@ -2,6 +2,7 @@
     x:Class="PDF_Office.App"
     xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+    xmlns:Themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero2"
     xmlns:local="clr-namespace:PDF_Office"
     xmlns:prism="http://prismlibrary.com/"
     xmlns:sys="clr-namespace:System;assembly=mscorlib">
@@ -21,6 +22,8 @@
                 <ResourceDictionary Source="pack://application:,,,/PDF Office;component/Styles/ContainerStyles/ComboxStyle/ComboxItemStyle.xaml" />
 
                 <ResourceDictionary Source="pack://application:,,,/PDF Office;component/Styles/PathButtonStyle.xaml" />
+                <ResourceDictionary Source="pack://application:,,,/PDF Office;component/Styles/PathRadioButtonDictionary.xaml" />
+                <ResourceDictionary Source="pack://application:,,,/PDF Office;component/Styles/ImageRadioButtonDictionary.xaml" />
                 <ResourceDictionary Source="pack://application:,,,/PDF Office;component/Styles/ContextMenuTextEditStyle.xaml" />
                 <ResourceDictionary Source="pack://application:,,,/PDF Office;component/Styles/ContextMenuStyle.xaml" />
                 <!--  Enable show customctrol's correctly UI in Xaml Designer  -->
@@ -342,7 +345,483 @@
                 </Setter>
             </Style>
 
+            <!--  Design Token ComboboxItem  -->
+            <Style TargetType="{x:Type ComboBoxItem}">
+                <Setter Property="Foreground" Value="{StaticResource color.sys.text.neutral.lv1}" />
+                <Setter Property="BorderThickness" Value="0" />
+                <Setter Property="Padding" Value="8,0" />
+                <Setter Property="Template">
+                    <Setter.Value>
+                        <ControlTemplate TargetType="{x:Type ComboBoxItem}">
+                            <Border
+                                Name="Bd"
+                                Padding="{TemplateBinding Control.Padding}"
+                                Background="{TemplateBinding Panel.Background}"
+                                BorderBrush="{TemplateBinding Border.BorderBrush}"
+                                BorderThickness="{TemplateBinding Border.BorderThickness}"
+                                CornerRadius="{StaticResource border-radius.4}"
+                                SnapsToDevicePixels="True">
+                                <ContentPresenter
+                                    HorizontalAlignment="{TemplateBinding Control.HorizontalContentAlignment}"
+                                    VerticalAlignment="{TemplateBinding Control.VerticalContentAlignment}"
+                                    Content="{TemplateBinding ContentControl.Content}"
+                                    ContentStringFormat="{TemplateBinding ContentControl.ContentStringFormat}"
+                                    ContentTemplate="{TemplateBinding ContentControl.ContentTemplate}"
+                                    SnapsToDevicePixels="{TemplateBinding UIElement.SnapsToDevicePixels}" />
+                            </Border>
+                            <ControlTemplate.Triggers>
+                                <Trigger Property="UIElement.IsEnabled" Value="False">
+                                    <Setter Property="Foreground" Value="{StaticResource color.sys.text.neutral.dis}" />
+                                </Trigger>
+                                <MultiTrigger>
+                                    <MultiTrigger.Conditions>
+                                        <Condition Property="Selector.IsSelected" Value="False" />
+                                        <Condition Property="UIElement.IsMouseOver" Value="True" />
+                                        <Condition Property="UIElement.IsKeyboardFocused" Value="False" />
+                                    </MultiTrigger.Conditions>
+                                    <Setter TargetName="Bd" Property="Panel.Background" Value="{StaticResource color.item-state.hov.bg}" />
+                                    <Setter TargetName="Bd" Property="Border.BorderBrush" Value="#A826A0DA" />
+                                </MultiTrigger>
+                                <MultiTrigger>
+                                    <MultiTrigger.Conditions>
+                                        <Condition Property="Selector.IsSelected" Value="True" />
+                                        <Condition Property="UIElement.IsMouseOver" Value="False" />
+                                        <Condition Property="UIElement.IsKeyboardFocused" Value="True" />
+                                    </MultiTrigger.Conditions>
+                                    <Setter TargetName="Bd" Property="Panel.Background" Value="{StaticResource color.item-state.sel.bg.lv1}" />
+                                    <Setter TargetName="Bd" Property="Border.BorderBrush" Value="#26A0DA" />
+                                </MultiTrigger>
+                                <MultiTrigger>
+                                    <MultiTrigger.Conditions>
+                                        <Condition Property="Selector.IsSelected" Value="True" />
+                                        <Condition Property="UIElement.IsMouseOver" Value="True" />
+                                    </MultiTrigger.Conditions>
+                                    <Setter TargetName="Bd" Property="Panel.Background" Value="{StaticResource color.item-state.hov.bg}" />
+                                    <Setter TargetName="Bd" Property="Border.BorderBrush" Value="#1A477EDE" />
+                                </MultiTrigger>
+                                <MultiTrigger>
+                                    <MultiTrigger.Conditions>
+                                        <Condition Property="Selector.IsSelected" Value="True" />
+                                        <Condition Property="UIElement.IsMouseOver" Value="False" />
+                                        <Condition Property="UIElement.IsKeyboardFocused" Value="False" />
+                                    </MultiTrigger.Conditions>
+                                    <Setter TargetName="Bd" Property="Panel.Background" Value="{StaticResource color.item-state.sel.bg.lv1}" />
+                                    <Setter TargetName="Bd" Property="Border.BorderBrush" Value="#DADADA" />
+                                </MultiTrigger>
+                                <MultiTrigger>
+                                    <MultiTrigger.Conditions>
+                                        <Condition Property="Selector.IsSelected" Value="False" />
+                                        <Condition Property="UIElement.IsMouseOver" Value="False" />
+                                        <Condition Property="UIElement.IsKeyboardFocused" Value="True" />
+                                    </MultiTrigger.Conditions>
+                                    <Setter TargetName="Bd" Property="Border.BorderBrush" Value="#26A0DA" />
+                                </MultiTrigger>
+                                <MultiTrigger>
+                                    <MultiTrigger.Conditions>
+                                        <Condition Property="Selector.IsSelected" Value="False" />
+                                        <Condition Property="UIElement.IsMouseOver" Value="True" />
+                                        <Condition Property="UIElement.IsKeyboardFocused" Value="True" />
+                                    </MultiTrigger.Conditions>
+                                    <Setter TargetName="Bd" Property="Panel.Background" Value="{StaticResource color.item-state.hov.bg}" />
+                                    <Setter TargetName="Bd" Property="Border.BorderBrush" Value="#1A000000" />
+                                </MultiTrigger>
+                            </ControlTemplate.Triggers>
+                        </ControlTemplate>
+                    </Setter.Value>
+                </Setter>
+            </Style>
+
+            <Style x:Key="ComboBoxToggleButton" TargetType="{x:Type ToggleButton}">
+                <Setter Property="OverridesDefaultStyle" Value="true" />
+                <Setter Property="IsTabStop" Value="false" />
+                <Setter Property="Focusable" Value="false" />
+                <Setter Property="ClickMode" Value="Press" />
+                <Setter Property="Template">
+                    <Setter.Value>
+                        <ControlTemplate TargetType="{x:Type ToggleButton}">
+                            <Border
+                                x:Name="templateRoot"
+                                Background="Transparent"
+                                BorderBrush="{StaticResource color.field.border.norm}"
+                                BorderThickness="{TemplateBinding BorderThickness}"
+                                CornerRadius="{StaticResource border-radius.4}"
+                                SnapsToDevicePixels="true">
+                                <Border
+                                    x:Name="splitBorder"
+                                    Width="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}"
+                                    Margin="8,0"
+                                    HorizontalAlignment="Right"
+                                    BorderBrush="Transparent"
+                                    BorderThickness="0"
+                                    SnapsToDevicePixels="true">
+                                    <Path
+                                        x:Name="arrow"
+                                        Width="12"
+                                        Height="12"
+                                        Margin="0"
+                                        HorizontalAlignment="Center"
+                                        VerticalAlignment="Center"
+                                        Data="M6 7.56434L2.03039 3.59473L0.969727 4.65539L5.46967 9.15533C5.76256 9.44822 6.23743 9.44822 6.53033 9.15533L11.0303 4.65539L9.9696 3.59473L6 7.56434Z"
+                                        Fill="{StaticResource color.icon.arrow.gray.def}" />
+                                </Border>
+                            </Border>
+                            <ControlTemplate.Triggers>
+                                <MultiDataTrigger>
+                                    <MultiDataTrigger.Conditions>
+                                        <Condition Binding="{Binding IsEditable, RelativeSource={RelativeSource AncestorType={x:Type ComboBox}}}" Value="true" />
+                                        <Condition Binding="{Binding IsMouseOver, RelativeSource={RelativeSource Self}}" Value="false" />
+                                        <Condition Binding="{Binding IsPressed, RelativeSource={RelativeSource Self}}" Value="false" />
+                                        <Condition Binding="{Binding IsEnabled, RelativeSource={RelativeSource Self}}" Value="true" />
+                                    </MultiDataTrigger.Conditions>
+                                    <Setter TargetName="templateRoot" Property="BorderBrush" Value="{StaticResource color.field.border.norm}" />
+                                </MultiDataTrigger>
+                                <Trigger Property="IsMouseOver" Value="true">
+                                    <Setter TargetName="arrow" Property="Fill" Value="{StaticResource color.icon.arrow.accent.hov}" />
+                                    <Setter TargetName="templateRoot" Property="BorderBrush" Value="{StaticResource color.field.border.hov}" />
+                                </Trigger>
+                                <MultiDataTrigger>
+                                    <MultiDataTrigger.Conditions>
+                                        <Condition Binding="{Binding IsMouseOver, RelativeSource={RelativeSource Self}}" Value="true" />
+                                        <Condition Binding="{Binding IsEditable, RelativeSource={RelativeSource AncestorType={x:Type ComboBox}}}" Value="false" />
+                                    </MultiDataTrigger.Conditions>
+                                    <Setter TargetName="templateRoot" Property="BorderBrush" Value="{StaticResource color.field.border.hov}" />
+                                </MultiDataTrigger>
+                                <MultiDataTrigger>
+                                    <MultiDataTrigger.Conditions>
+                                        <Condition Binding="{Binding IsMouseOver, RelativeSource={RelativeSource Self}}" Value="true" />
+                                        <Condition Binding="{Binding IsEditable, RelativeSource={RelativeSource AncestorType={x:Type ComboBox}}}" Value="true" />
+                                    </MultiDataTrigger.Conditions>
+                                    <Setter TargetName="templateRoot" Property="BorderBrush" Value="{StaticResource color.field.border.hov}" />
+                                </MultiDataTrigger>
+                                <Trigger Property="IsPressed" Value="true">
+                                    <Setter TargetName="arrow" Property="Fill" Value="{StaticResource color.icon.arrow.accent.hov}" />
+                                </Trigger>
+                                <Trigger Property="IsFocused" Value="True">
+                                    <Setter TargetName="templateRoot" Property="BorderBrush" Value="{StaticResource color.field.border.focus}" />
+                                    <Setter TargetName="templateRoot" Property="Effect" Value="{StaticResource shadow.blue-0-4}" />
+                                </Trigger>
+                                <Trigger Property="IsChecked" Value="True">
+                                    <Setter TargetName="arrow" Property="LayoutTransform">
+                                        <Setter.Value>
+                                            <RotateTransform Angle="180" />
+                                        </Setter.Value>
+                                    </Setter>
+                                </Trigger>
+                                <Trigger Property="IsEnabled" Value="false">
+                                    <Setter TargetName="arrow" Property="Fill" Value="{StaticResource color.icon.arrow.gray.dis}" />
+                                    <Setter TargetName="templateRoot" Property="Background" Value="{StaticResource color.field.bg.dis}" />
+                                    <Setter TargetName="templateRoot" Property="BorderBrush" Value="{StaticResource color.field.border.dis}" />
+                                </Trigger>
+                            </ControlTemplate.Triggers>
+                        </ControlTemplate>
+                    </Setter.Value>
+                </Setter>
+            </Style>
+            <ControlTemplate x:Key="ComboBoxTemplate" TargetType="{x:Type ComboBox}">
+                <Grid
+                    x:Name="templateRoot"
+                    Background="Transparent"
+                    SnapsToDevicePixels="true">
+                    <Grid.ColumnDefinitions>
+                        <ColumnDefinition Width="*" />
+                        <ColumnDefinition Width="0" MinWidth="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}" />
+                    </Grid.ColumnDefinitions>
+                    <Popup
+                        x:Name="PART_Popup"
+                        Grid.ColumnSpan="2"
+                        Margin="1"
+                        AllowsTransparency="true"
+                        IsOpen="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
+                        Placement="Bottom"
+                        PopupAnimation="{DynamicResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}">
+                        <Themes:SystemDropShadowChrome
+                            x:Name="shadow"
+                            MinWidth="{Binding ActualWidth, ElementName=templateRoot}"
+                            MaxHeight="{TemplateBinding MaxDropDownHeight}"
+                            Color="Transparent">
+                            <Border
+                                x:Name="dropDownBorder"
+                                Margin="0,4,0,0"
+                                Background="{StaticResource color.sys.layout.anti}"
+                                BorderBrush="{DynamicResource {x:Static SystemColors.WindowFrameBrushKey}}"
+                                BorderThickness="0"
+                                CornerRadius="{StaticResource radius.base.m}"
+                                Effect="{StaticResource shadow.neutral.m}">
+                                <ScrollViewer x:Name="DropDownScrollViewer">
+                                    <Grid HorizontalAlignment="Stretch" SnapsToDevicePixels="True">
+                                        <!--  圆角背景  -->
+                                        <Border
+                                            x:Name="Bd"
+                                            HorizontalAlignment="Stretch"
+                                            Background="{StaticResource color.sys.layout.anti}"
+                                            BorderThickness="1"
+                                            CornerRadius="7">
+                                            <!--  面板内容  -->
+                                            <StackPanel
+                                                Margin="4"
+                                                HorizontalAlignment="Stretch"
+                                                IsItemsHost="True"
+                                                KeyboardNavigation.DirectionalNavigation="Contained" />
+                                        </Border>
+                                    </Grid>
+                                </ScrollViewer>
+                            </Border>
+                        </Themes:SystemDropShadowChrome>
+                    </Popup>
+                    <ToggleButton
+                        x:Name="toggleButton"
+                        Grid.ColumnSpan="2"
+                        Margin="2"
+                        Background="{TemplateBinding Background}"
+                        BorderBrush="{TemplateBinding BorderBrush}"
+                        BorderThickness="{TemplateBinding BorderThickness}"
+                        IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
+                        Style="{StaticResource ComboBoxToggleButton}" />
+                    <ContentPresenter
+                        x:Name="contentPresenter"
+                        Margin="{TemplateBinding Padding}"
+                        HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
+                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
+                        Content="{TemplateBinding SelectionBoxItem}"
+                        ContentStringFormat="{TemplateBinding SelectionBoxItemStringFormat}"
+                        ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}"
+                        ContentTemplateSelector="{TemplateBinding ItemTemplateSelector}"
+                        IsHitTestVisible="false"
+                        SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
+                </Grid>
+                <ControlTemplate.Triggers>
+                    <Trigger SourceName="PART_Popup" Property="HasDropShadow" Value="true">
+                        <Setter TargetName="shadow" Property="Margin" Value="5" />
+                    </Trigger>
+                    <Trigger Property="HasItems" Value="false">
+                        <Setter TargetName="dropDownBorder" Property="Height" Value="95" />
+                    </Trigger>
+                    <MultiTrigger>
+                        <MultiTrigger.Conditions>
+                            <Condition Property="IsGrouping" Value="true" />
+                            <Condition Property="VirtualizingPanel.IsVirtualizingWhenGrouping" Value="false" />
+                        </MultiTrigger.Conditions>
+                        <Setter Property="ScrollViewer.CanContentScroll" Value="false" />
+                    </MultiTrigger>
+                </ControlTemplate.Triggers>
+            </ControlTemplate>
+            <SolidColorBrush x:Key="TextBox.Static.Background" Color="#FFFFFFFF" />
+            <Style x:Key="ComboBoxEditableTextBox" TargetType="{x:Type TextBox}">
+                <Setter Property="OverridesDefaultStyle" Value="true" />
+                <Setter Property="AllowDrop" Value="true" />
+                <Setter Property="MinWidth" Value="0" />
+                <Setter Property="MinHeight" Value="0" />
+                <Setter Property="FocusVisualStyle" Value="{x:Null}" />
+                <Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst" />
+                <Setter Property="Stylus.IsFlicksEnabled" Value="False" />
+                <Setter Property="Template">
+                    <Setter.Value>
+                        <ControlTemplate TargetType="{x:Type TextBox}">
+                            <ScrollViewer
+                                x:Name="PART_ContentHost"
+                                Background="Transparent"
+                                Focusable="false"
+                                HorizontalScrollBarVisibility="Hidden"
+                                VerticalScrollBarVisibility="Hidden" />
+                        </ControlTemplate>
+                    </Setter.Value>
+                </Setter>
+            </Style>
+            <ControlTemplate x:Key="ComboBoxEditableTemplate" TargetType="{x:Type ComboBox}">
+                <Grid x:Name="templateRoot" SnapsToDevicePixels="true">
+                    <Grid.ColumnDefinitions>
+                        <ColumnDefinition Width="*" />
+                        <ColumnDefinition Width="0" MinWidth="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}" />
+                    </Grid.ColumnDefinitions>
+                    <Popup
+                        x:Name="PART_Popup"
+                        Grid.ColumnSpan="2"
+                        AllowsTransparency="true"
+                        IsOpen="{Binding IsDropDownOpen, RelativeSource={RelativeSource TemplatedParent}}"
+                        Placement="Bottom"
+                        PopupAnimation="{DynamicResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}">
+                        <Themes:SystemDropShadowChrome
+                            x:Name="shadow"
+                            MinWidth="{Binding ActualWidth, ElementName=templateRoot}"
+                            MaxHeight="{TemplateBinding MaxDropDownHeight}"
+                            Color="Transparent">
+                            <Border
+                                x:Name="dropDownBorder"
+                                Background="{DynamicResource {x:Static SystemColors.WindowBrushKey}}"
+                                BorderBrush="{DynamicResource {x:Static SystemColors.WindowFrameBrushKey}}"
+                                BorderThickness="1">
+                                <ScrollViewer x:Name="DropDownScrollViewer">
+                                    <Grid x:Name="grid" RenderOptions.ClearTypeHint="Enabled">
+                                        <Canvas
+                                            x:Name="canvas"
+                                            Width="0"
+                                            Height="0"
+                                            HorizontalAlignment="Left"
+                                            VerticalAlignment="Top">
+                                            <Rectangle
+                                                x:Name="opaqueRect"
+                                                Width="{Binding ActualWidth, ElementName=dropDownBorder}"
+                                                Height="{Binding ActualHeight, ElementName=dropDownBorder}"
+                                                Fill="{Binding Background, ElementName=dropDownBorder}" />
+                                        </Canvas>
+                                        <ItemsPresenter
+                                            x:Name="ItemsPresenter"
+                                            KeyboardNavigation.DirectionalNavigation="Contained"
+                                            SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
+                                    </Grid>
+                                </ScrollViewer>
+                            </Border>
+                        </Themes:SystemDropShadowChrome>
+                    </Popup>
+                    <ToggleButton
+                        x:Name="toggleButton"
+                        Grid.ColumnSpan="2"
+                        Background="{TemplateBinding Background}"
+                        BorderBrush="{TemplateBinding BorderBrush}"
+                        BorderThickness="{TemplateBinding BorderThickness}"
+                        IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
+                        Style="{StaticResource ComboBoxToggleButton}" />
+                    <Border
+                        x:Name="border"
+                        Margin="{TemplateBinding BorderThickness}"
+                        Background="{StaticResource TextBox.Static.Background}">
+                        <TextBox
+                            x:Name="PART_EditableTextBox"
+                            Margin="{TemplateBinding Padding}"
+                            HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
+                            VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
+                            IsReadOnly="{Binding IsReadOnly, RelativeSource={RelativeSource TemplatedParent}}"
+                            Style="{StaticResource ComboBoxEditableTextBox}" />
+                    </Border>
+                </Grid>
+                <ControlTemplate.Triggers>
+                    <Trigger Property="IsEnabled" Value="false">
+                        <Setter TargetName="border" Property="Opacity" Value="0.56" />
+                    </Trigger>
+                    <Trigger Property="IsKeyboardFocusWithin" Value="true">
+                        <Setter Property="Foreground" Value="Black" />
+                    </Trigger>
+                    <Trigger SourceName="PART_Popup" Property="HasDropShadow" Value="true">
+                        <Setter TargetName="shadow" Property="Margin" Value="0,0,5,5" />
+                        <Setter TargetName="shadow" Property="Color" Value="#71000000" />
+                    </Trigger>
+                    <Trigger Property="HasItems" Value="false">
+                        <Setter TargetName="dropDownBorder" Property="Height" Value="95" />
+                    </Trigger>
+                    <MultiTrigger>
+                        <MultiTrigger.Conditions>
+                            <Condition Property="IsGrouping" Value="true" />
+                            <Condition Property="VirtualizingPanel.IsVirtualizingWhenGrouping" Value="false" />
+                        </MultiTrigger.Conditions>
+                        <Setter Property="ScrollViewer.CanContentScroll" Value="false" />
+                    </MultiTrigger>
+                    <Trigger SourceName="DropDownScrollViewer" Property="ScrollViewer.CanContentScroll" Value="false">
+                        <Setter TargetName="opaqueRect" Property="Canvas.Top" Value="{Binding VerticalOffset, ElementName=DropDownScrollViewer}" />
+                        <Setter TargetName="opaqueRect" Property="Canvas.Left" Value="{Binding HorizontalOffset, ElementName=DropDownScrollViewer}" />
+                    </Trigger>
+                </ControlTemplate.Triggers>
+            </ControlTemplate>
+            <!--  Design Token ComBobox  -->
+            <Style TargetType="{x:Type ComboBox}">
+                <Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual}" />
+                <Setter Property="Background" Value="{StaticResource color.field.bg.def}" />
+                <Setter Property="BorderBrush" Value="{StaticResource color.field.border.norm}" />
+                <Setter Property="Foreground" Value="{StaticResource color.field.text.act}" />
+                <Setter Property="BorderThickness" Value="{StaticResource border-width.1}" />
+                <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto" />
+                <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto" />
+                <Setter Property="VerticalContentAlignment" Value="Center" />
+                <Setter Property="Padding" Value="8,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>
+            </Style>
 
+            <!--  Design Token RadionButton  -->
+            <Style TargetType="{x:Type RadioButton}">
+                <Setter Property="FocusVisualStyle" Value="{x:Null}" />
+                <Setter Property="Background" Value="{StaticResource color.icon.checkbox-radio.norm.bg}" />
+                <Setter Property="BorderBrush" Value="{StaticResource color.icon.checkbox-radio.norm.border}" />
+                <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" />
+                <Setter Property="BorderThickness" Value="1" />
+                <Setter Property="Padding" Value="8,0,0,0" />
+                <Setter Property="Template">
+                    <Setter.Value>
+                        <ControlTemplate TargetType="{x:Type RadioButton}">
+                            <Grid
+                                x:Name="templateRoot"
+                                Background="Transparent"
+                                SnapsToDevicePixels="True">
+                                <Grid.ColumnDefinitions>
+                                    <ColumnDefinition Width="Auto" />
+                                    <ColumnDefinition Width="*" />
+                                </Grid.ColumnDefinitions>
+                                <Border
+                                    x:Name="radioButtonBorder"
+                                    Width="14"
+                                    Height="14"
+                                    HorizontalAlignment="Center"
+                                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
+                                    Background="{TemplateBinding Background}"
+                                    BorderBrush="{TemplateBinding BorderBrush}"
+                                    BorderThickness="{TemplateBinding BorderThickness}"
+                                    CornerRadius="100">
+                                    <Grid x:Name="markGrid" Margin="1.8">
+                                        <Ellipse
+                                            x:Name="optionMark"
+                                            MinWidth="6"
+                                            MinHeight="6"
+                                            Fill="{StaticResource color.icon.checkbox-radio.sel.bg}"
+                                            Opacity="0" />
+                                    </Grid>
+                                </Border>
+                                <ContentPresenter
+                                    x:Name="contentPresenter"
+                                    Grid.Column="1"
+                                    Margin="{TemplateBinding Padding}"
+                                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
+                                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
+                                    Focusable="False"
+                                    RecognizesAccessKey="True"
+                                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
+                            </Grid>
+                            <ControlTemplate.Triggers>
+                                <!--<Trigger Property="HasContent" Value="true">
+                                <Setter Property="Padding" Value="4,-1,0,0" />
+                            </Trigger>-->
+                                <Trigger Property="IsMouseOver" Value="true">
+                                    <Setter TargetName="radioButtonBorder" Property="BorderBrush" Value="{StaticResource color.icon.checkbox-radio.hov.border}" />
+                                </Trigger>
+                                <Trigger Property="IsEnabled" Value="false">
+                                    <Setter TargetName="radioButtonBorder" Property="Background" Value="{StaticResource color.icon.checkbox-radio.dis.bg}" />
+                                    <Setter TargetName="radioButtonBorder" Property="BorderBrush" Value="{StaticResource color.icon.checkbox-radio.dis.border}" />
+                                    <Setter TargetName="optionMark" Property="Fill" Value="{StaticResource color.icon.checkbox-radio.dis.fill}" />
+                                </Trigger>
+                                <!--<Trigger Property="IsPressed" Value="true">
+                                <Setter Property="Background" TargetName="radioButtonBorder" Value="{StaticResource RadioButton.Pressed.Background2}"/>
+                                <Setter Property="BorderBrush" TargetName="radioButtonBorder" Value="{StaticResource RadioButton.Pressed.Border}"/>
+                                <Setter Property="Fill" TargetName="optionMark" Value="{StaticResource RadioButton.Pressed.Glyph2}"/>
+                            </Trigger>-->
+                                <Trigger Property="IsChecked" Value="true">
+                                    <Setter TargetName="optionMark" Property="Opacity" Value="1" />
+                                    <Setter TargetName="radioButtonBorder" Property="BorderBrush" Value="{StaticResource color.icon.checkbox-radio.hov.border}" />
+                                </Trigger>
+                                <Trigger Property="IsChecked" Value="{x:Null}">
+                                    <Setter TargetName="optionMark" Property="Opacity" Value="0.56" />
+                                </Trigger>
+                            </ControlTemplate.Triggers>
+                        </ControlTemplate>
+                    </Setter.Value>
+                </Setter>
+            </Style>
         </ResourceDictionary>
     </Application.Resources>
 </prism:PrismApplication>

+ 2 - 1
PDF Office/App.xaml.cs

@@ -212,6 +212,7 @@ namespace PDF_Office
             containerRegistry.RegisterForNavigation<ShapFillProperty>();
             containerRegistry.RegisterForNavigation<TextFillProperty>();
             //Form表单
+            containerRegistry.RegisterForNavigation<EmptyFormProperty>();
             containerRegistry.RegisterForNavigation<FormsToolContent>();
             containerRegistry.RegisterForNavigation<TextFieldProperty>();
             containerRegistry.RegisterForNavigation<ButtonProperty>();
@@ -255,7 +256,7 @@ namespace PDF_Office
             containerRegistry.RegisterDialog<ConverterProgressBarDialog>(DialogNames.ConverterProgressBarDialog);
             containerRegistry.RegisterDialog<ScreenAnnotationDialog>(DialogNames.ScreenAnnotationDialog);
             containerRegistry.RegisterDialog<AddBookmarkDialog>(DialogNames.AddBookmarkDialog);
-
+            containerRegistry.RegisterDialog<EditPresetColorsDialog>(DialogNames.EditPresetColorsDialog);
             #endregion 注册弹窗
         }
 

BIN
PDF Office/ComPDFKit.Viewer.dll


+ 4 - 0
PDF Office/CustomControl/CompositeControl/ColorContent.xaml.cs

@@ -55,6 +55,10 @@ namespace PDF_Office.CustomControl.CompositeControl
             Color = defaultColor;
         }
     }
+
+    //类说明:
+    //复合控件:调色板
+    //组合而成的控件:颜色圆形UI的列表容器、调色板选择的颜色圆形按钮UI,弹出调色版的按钮
     /// <summary>
     /// ColorContent.xaml 的交互逻辑
     /// </summary>

+ 3 - 0
PDF Office/CustomControl/CompositeControl/ColorSubContent.xaml.cs

@@ -15,6 +15,9 @@ using System.Windows.Shapes;
 
 namespace PDF_Office.CustomControl.CompositeControl
 {
+    //类的说明:
+    //复合控件:调色版
+    //组合而成的控件:调色板选择的颜色圆形按钮UI,弹出调色版的按钮
     /// <summary>
     /// ColorSubContent.xaml 的交互逻辑
     /// </summary>

+ 8 - 10
PDF Office/CustomControl/CompositeControl/SlidComboControl.xaml

@@ -16,6 +16,11 @@
                 <ResourceDictionary Source="../../Styles/CustomBtnStyle.xaml"/>
             </ResourceDictionary.MergedDictionaries>
 
+            <DataTemplate x:Key="numberData">
+                <Grid>
+                    <TextBlock Text="{Binding Content}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
+                </Grid>
+            </DataTemplate>
         </ResourceDictionary>
     </UserControl.Resources>
     <Grid>
@@ -42,21 +47,14 @@
             <Border Grid.Column="1" BorderBrush="#E2E3E6"  Width="80" Height="32" Margin="0,0,11,0"  BorderThickness="0">
                 <Grid>
                     <ComboBox Name="ThicknessBox" BorderThickness="1" Padding="10" Background="Transparent" BorderBrush="#FFE2E3E6" 
-                                  MaxDropDownHeight="200">
+                                  MaxDropDownHeight="200"
+                            ItemTemplate="{StaticResource numberData}"
+                              >
                         <ComboBox.ItemContainerStyle>
                             <Style TargetType="{x:Type ComboBoxItem}">
                                 <Setter Property="Padding" Value="10 0 0 0"/>
                             </Style>
                         </ComboBox.ItemContainerStyle>
-                        <ComboBoxItem Content="1" Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}"/>
-                        <ComboBoxItem Content="3" Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}"/>
-                        <ComboBoxItem Content="6" Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}"/>
-                        <ComboBoxItem Content="9" Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}"/>
-                        <ComboBoxItem Content="12" Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}"/>
-                        <ComboBoxItem Content="15" Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}"/>
-                        <ComboBoxItem Content="18" Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}"/>
-                        <ComboBoxItem Content="21" Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}"/>
-                        <ComboBoxItem Content="24" Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}"/>
                     </ComboBox>
                     <TextBox Name="ThicknessText" Background="White" FontFamily="Segoe UI" FontSize="14"  Height="20" Margin="10,0,35,0" IsReadOnly="True"
                              BorderThickness="0" VerticalAlignment="Center" TextAlignment="Left" >

+ 58 - 19
PDF Office/CustomControl/CompositeControl/SlidComboControl.xaml.cs

@@ -1,4 +1,5 @@
-using System;
+using Prism.Commands;
+using System;
 using System.Collections.Generic;
 using System.Linq;
 using System.Text;
@@ -15,15 +16,59 @@ using System.Windows.Shapes;
 
 namespace PDF_Office.CustomControl.CompositeControl
 {
+   
+    public class ComboNumberItem
+    {
+        public double Value { get; set; }
+        public string Content { get; set; }
+        public string Unit { get; set; }
+        public ComboNumberItem(double value,string unitStr = "")
+        {
+            Content = value + unitStr;
+        }
+    }
     /// <summary>
     /// SlidComboControl.xaml 的交互逻辑
     /// </summary>
     public partial class SlidComboControl : UserControl
     {
-        public event EventHandler<double> ValueChanged;
+        public List<ComboNumberItem> Items { get;private set; }    
+        public event RoutedEventHandler ValueChanged;
+        
         public SlidComboControl()
         {
             InitializeComponent();
+           
+            Items = new List<ComboNumberItem>();
+            DefaultItems();
+        }
+
+        public void SetItemSource(List<ComboNumberItem> items)
+        {
+            Items = items;
+            ThicknessBox.ItemsSource = Items;
+        }
+
+        private void DefaultItems()
+        {
+            var item = new ComboNumberItem(3);
+            Items.Add(item);
+            item = new ComboNumberItem(6);
+            Items.Add(item);
+            item = new ComboNumberItem(9);
+            Items.Add(item);
+            item = new ComboNumberItem(12);
+            Items.Add(item);
+            item = new ComboNumberItem(15);
+            Items.Add(item);
+            item = new ComboNumberItem(18);
+            Items.Add(item);
+            item = new ComboNumberItem(21);
+            Items.Add(item);
+            item = new ComboNumberItem(24);
+            Items.Add(item);
+
+            ThicknessBox.ItemsSource = Items;
         }
 
         private void UserControl_Loaded(object sender, RoutedEventArgs e)
@@ -38,11 +83,11 @@ namespace PDF_Office.CustomControl.CompositeControl
         {
             foreach(var item in ThicknessBox.Items)
             {
-                var itemData = item as ComboBoxItem;
+
+                var itemData = item as ComboNumberItem;
                 if(itemData != null)
                 {
-                   var doubleItem = double.Parse(itemData.Content.ToString());
-                    if(doubleItem == Value)
+                    if(itemData.Value == Value)
                     {
                         ThicknessBox.SelectedItem = itemData;
                         break;
@@ -54,20 +99,14 @@ namespace PDF_Office.CustomControl.CompositeControl
 
         private void ThicknessBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
         {
-            var listItem = ThicknessBox.ItemContainerGenerator.ContainerFromItem(ThicknessBox.SelectedItem) as ComboBoxItem;
-            if (listItem != null)
+            var item = ThicknessBox.SelectedItem as ComboNumberItem;
+            if(item != null)
             {
-                Value = double.Parse(listItem.Content.ToString());
-                ThicknessText.Text = listItem.Content.ToString();
+                Value = item.Value;
+                ThicknessText.Text = item.Content;
+                ValueChanged?.Invoke(Value, e);
             }
-            else
-            {
-                ThicknessText.Text = "1";
-                Value = 1.0;
-            }
-                
-
-            
+           
 
         }
 
@@ -78,14 +117,14 @@ namespace PDF_Office.CustomControl.CompositeControl
         }
         public static readonly DependencyProperty ValueProperty =
            DependencyProperty.Register("Value", typeof(double), typeof(SlidComboControl), new PropertyMetadata(1.0, SelectedValuePropertyChanged));
-
+       
         private static void SelectedValuePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
         {
             var control = d as SlidComboControl;
             var value = (double)e.NewValue;
             if (control != null)
             {
-                control.ValueChanged?.Invoke(control, value);
+                control.ValueChanged?.Invoke(value, null);
             }
         }
     }

+ 1 - 1
PDF Office/CustomControl/DialogContent.cs

@@ -21,7 +21,7 @@ namespace PDF_Office.CustomControl
     /// 
     /// Content里暂时不能包含region 会注册不上,需要留意
     /// </summary>
-    public class DialogContent : Control
+    public class DialogContent : ContentControl
     {
         static DialogContent()
         {

+ 253 - 0
PDF Office/CustomControl/ImageRadioButton .cs

@@ -0,0 +1,253 @@
+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.Media;
+
+namespace PDF_Office.CustomControl
+{
+    public class ImageRadioButton : RadioButton
+    {
+        static ImageRadioButton()
+        {
+            DefaultStyleKeyProperty.OverrideMetadata(typeof(ImageRadioButton), new FrameworkPropertyMetadata(typeof(ImageRadioButton)));
+        }
+
+        public override void OnApplyTemplate()
+        {
+            base.OnApplyTemplate();
+            if (this.MouseOverBackground == null)
+            {
+                this.MouseOverBackground = Background;
+            }
+            if (this.MouseDownBackground == null)
+            {
+                if (this.MouseOverBackground == null)
+                {
+                    this.MouseDownBackground = Background;
+                }
+                else
+                {
+                    this.MouseDownBackground = MouseOverBackground;
+                }
+            }
+            if (this.MouseOverBorderBrush == null)
+            {
+                this.MouseOverBorderBrush = BorderBrush;
+            }
+            if (this.MouseDownBorderBrush == null)
+            {
+                if (this.MouseOverBorderBrush == null)
+                {
+                    this.MouseDownBorderBrush = BorderBrush;
+                }
+                else
+                {
+                    this.MouseDownBorderBrush = MouseOverBorderBrush;
+                }
+            }
+            if (this.MouseOverForeground == null)
+            {
+                this.MouseOverForeground = Foreground;
+            }
+            if (this.MouseDownForeground == null)
+            {
+                if (this.MouseOverForeground == null)
+                {
+                    this.MouseDownForeground = Foreground;
+                }
+                else
+                {
+                    this.MouseDownForeground = this.MouseOverForeground;
+                }
+            }
+        }
+
+        #region 依赖项属性  
+
+        /// <summary>  
+        /// 鼠标移上去的背景颜色  
+        /// </summary>  
+        public static readonly DependencyProperty MouseOverBackgroundProperty
+            = DependencyProperty.Register("MouseOverBackground", typeof(Brush), typeof(ImageRadioButton));
+
+        /// <summary>  
+        /// 鼠标按下去的背景颜色  
+        /// </summary>  
+        public static readonly DependencyProperty MouseDownBackgroundProperty
+            = DependencyProperty.Register("MouseDownBackground", typeof(Brush), typeof(ImageRadioButton));
+
+        /// <summary>  
+        /// 鼠标移上去的字体颜色  
+        /// </summary>  
+        public static readonly DependencyProperty MouseOverForegroundProperty
+            = DependencyProperty.Register("MouseOverForeground", typeof(Brush), typeof(ImageRadioButton), new PropertyMetadata(null, null));
+
+        /// <summary>  
+        /// 鼠标按下去的字体颜色  
+        /// </summary>  
+        public static readonly DependencyProperty MouseDownForegroundProperty
+            = DependencyProperty.Register("MouseDownForeground", typeof(Brush), typeof(ImageRadioButton), new PropertyMetadata(null, null));
+
+        /// <summary>  
+        /// 鼠标移上去的边框颜色  
+        /// </summary>  
+        public static readonly DependencyProperty MouseOverBorderBrushProperty
+            = DependencyProperty.Register("MouseOverBorderBrush", typeof(Brush), typeof(ImageRadioButton), new PropertyMetadata(null, null));
+
+        /// <summary>  
+        /// 鼠标按下去的边框颜色  
+        /// </summary>  
+        public static readonly DependencyProperty MouseDownBorderBrushProperty
+            = DependencyProperty.Register("MouseDownBorderBrush", typeof(Brush), typeof(ImageRadioButton), new PropertyMetadata(null, null));
+
+        /// <summary>  
+        /// 圆角  
+        /// </summary>  
+        public static readonly DependencyProperty CornerRadiusProperty
+            = DependencyProperty.Register("CornerRadius", typeof(CornerRadius), typeof(ImageRadioButton), null);
+
+        //图标  
+        public static readonly DependencyProperty IconProperty
+            = DependencyProperty.Register("Icon", typeof(ImageSource), typeof(ImageRadioButton), null);
+
+        //鼠标移上去的图标图标  
+        public static readonly DependencyProperty IconMouseOverProperty
+            = DependencyProperty.Register("IconMouseOver", typeof(ImageSource), typeof(ImageRadioButton), null);
+
+        //鼠标按下去的图标图标  
+        public static readonly DependencyProperty IconPressProperty
+            = DependencyProperty.Register("IconPress", typeof(ImageSource), typeof(ImageRadioButton), null);
+
+        //选中的图标图标  
+        public static readonly DependencyProperty IconCheckedProperty
+            = DependencyProperty.Register("IconChecked", typeof(ImageSource), typeof(ImageRadioButton), null);
+
+        //图标高度  
+        public static readonly DependencyProperty IconHeightProperty
+            = DependencyProperty.Register("IconHeight", typeof(double), typeof(ImageRadioButton), new PropertyMetadata(24.0, null));
+
+        //图标宽度  
+        public static readonly DependencyProperty IconWidthProperty
+            = DependencyProperty.Register("IconWidth", typeof(double), typeof(ImageRadioButton), new PropertyMetadata(24.0, null));
+
+        //图标和内容的对齐方式  
+        public static readonly DependencyProperty IconContentOrientationProperty
+            = DependencyProperty.Register("IconContentOrientation", typeof(Orientation), typeof(ImageRadioButton), new PropertyMetadata(Orientation.Horizontal, null));
+
+        //图标和内容的距离  
+        public static readonly DependencyProperty IconContentMarginProperty
+            = DependencyProperty.Register("IconContentMargin", typeof(Thickness), typeof(ImageRadioButton), new PropertyMetadata(new Thickness(0, 0, 0, 0), null));
+
+        #endregion
+
+        #region 属性包装
+
+        public Brush MouseOverBackground
+        {
+            get
+            {
+                return (Brush)GetValue(MouseOverBackgroundProperty);
+            }
+            set { SetValue(MouseOverBackgroundProperty, value); }
+        }
+
+        public Brush MouseDownBackground
+        {
+            get
+            {
+                return (Brush)GetValue(MouseDownBackgroundProperty);
+            }
+            set { SetValue(MouseDownBackgroundProperty, value); }
+        }
+
+        public Brush MouseOverForeground
+        {
+            get
+            {
+                return (Brush)GetValue(MouseOverForegroundProperty);
+            }
+            set { SetValue(MouseOverForegroundProperty, value); }
+        }
+
+        public Brush MouseDownForeground
+        {
+            get
+            {
+                return (Brush)GetValue(MouseDownForegroundProperty);
+            }
+            set { SetValue(MouseDownForegroundProperty, value); }
+        }
+
+        public Brush MouseOverBorderBrush
+        {
+            get { return (Brush)GetValue(MouseOverBorderBrushProperty); }
+            set { SetValue(MouseOverBorderBrushProperty, value); }
+        }
+
+        public Brush MouseDownBorderBrush
+        {
+            get { return (Brush)GetValue(MouseDownBorderBrushProperty); }
+            set { SetValue(MouseDownBorderBrushProperty, value); }
+        }
+
+        public CornerRadius CornerRadius
+        {
+            get { return (CornerRadius)GetValue(CornerRadiusProperty); }
+            set { SetValue(CornerRadiusProperty, value); }
+        }
+
+        public ImageSource Icon
+        {
+            get { return (ImageSource)GetValue(IconProperty); }
+            set { SetValue(IconProperty, value); }
+        }
+
+        public ImageSource IconMouseOver
+        {
+            get { return (ImageSource)GetValue(IconMouseOverProperty); }
+            set { SetValue(IconMouseOverProperty, value); }
+        }
+
+        public ImageSource IconPress
+        {
+            get { return (ImageSource)GetValue(IconPressProperty); }
+            set { SetValue(IconPressProperty, value); }
+        }
+
+        public ImageSource IconChecked
+        {
+            get { return (ImageSource)GetValue(IconCheckedProperty); }
+            set { SetValue(IconCheckedProperty, value); }
+        }
+
+        public double IconHeight
+        {
+            get { return (double)GetValue(IconHeightProperty); }
+            set { SetValue(IconHeightProperty, value); }
+        }
+
+        public double IconWidth
+        {
+            get { return (double)GetValue(IconWidthProperty); }
+            set { SetValue(IconWidthProperty, value); }
+        }
+
+        public Orientation IconContentOrientation
+        {
+            get { return (Orientation)GetValue(IconContentOrientationProperty); }
+            set { SetValue(IconContentOrientationProperty, value); }
+        }
+
+        public Thickness IconContentMargin
+        {
+            get { return (Thickness)GetValue(IconContentMarginProperty); }
+            set { SetValue(IconContentMarginProperty, value); }
+        }
+
+        #endregion
+    }
+}

+ 2 - 2
PDF Office/CustomControl/PathButton.cs

@@ -159,11 +159,11 @@ namespace PDF_Office.CustomControl
         public static readonly DependencyProperty IconCheckedProperty
             = DependencyProperty.Register("IconChecked", typeof(Geometry), typeof(PathButton), null);
 
-        //鼠标移上去的图标填充色   
+        //选中的图标填充色   
         public static readonly DependencyProperty IconCheckedFillProperty
             = DependencyProperty.Register("IconCheckedFill", typeof(Brush), typeof(PathButton), null);
 
-        //鼠标移上去的透明度 
+        //选中的图标的透明度 
         public static readonly DependencyProperty IconCheckedOpacityProperty
             = DependencyProperty.Register("IconCheckedOpacity", typeof(double), typeof(PathButton), null);
 

+ 355 - 0
PDF Office/CustomControl/PathRadioButton.cs

@@ -0,0 +1,355 @@
+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.Media;
+
+namespace PDF_Office.CustomControl
+{
+    public class PathRadioButton : RadioButton
+    {
+        static PathRadioButton()
+        {
+            DefaultStyleKeyProperty.OverrideMetadata(typeof(PathRadioButton), new FrameworkPropertyMetadata(typeof(PathRadioButton)));
+        }
+
+        public override void OnApplyTemplate()
+        {
+            base.OnApplyTemplate();
+            if (this.MouseOverBackground == null)
+            {
+                this.MouseOverBackground = Background;
+            }
+            if (this.MouseDownBackground == null)
+            {
+                if (this.MouseOverBackground == null)
+                {
+                    this.MouseDownBackground = Background;
+                }
+                else
+                {
+                    this.MouseDownBackground = MouseOverBackground;
+                }
+            }
+            if (this.MouseOverBorderBrush == null)
+            {
+                this.MouseOverBorderBrush = BorderBrush;
+            }
+            if (this.MouseDownBorderBrush == null)
+            {
+                if (this.MouseOverBorderBrush == null)
+                {
+                    this.MouseDownBorderBrush = BorderBrush;
+                }
+                else
+                {
+                    this.MouseDownBorderBrush = MouseOverBorderBrush;
+                }
+            }
+            if (this.MouseOverForeground == null)
+            {
+                this.MouseOverForeground = Foreground;
+            }
+            if (this.MouseDownForeground == null)
+            {
+                if (this.MouseOverForeground == null)
+                {
+                    this.MouseDownForeground = Foreground;
+                }
+                else
+                {
+                    this.MouseDownForeground = this.MouseOverForeground;
+                }
+            }
+            if (this.IconChecked == null)
+            {
+                if (this.IconPress == null)
+                {
+                    this.IconChecked = Icon;
+                }
+                else
+                {
+                    this.IconChecked = this.IconPress;
+                }
+            }
+
+            if (this.IconCheckedFill == null)
+            {
+                if (this.IconPressFill == null)
+                {
+                    this.IconCheckedFill = IconFill;
+                }
+                else
+                {
+                    this.IconCheckedFill = this.IconPressFill;
+                }
+            }
+        }
+
+        #region 依赖项属性  
+
+        /// <summary>  
+        /// 鼠标移上去的背景颜色  
+        /// </summary>  
+        public static readonly DependencyProperty MouseOverBackgroundProperty
+                = DependencyProperty.Register("MouseOverBackground", typeof(Brush), typeof(PathRadioButton));
+
+        /// <summary>  
+        /// 鼠标按下去的背景颜色  
+        /// </summary>  
+        public static readonly DependencyProperty MouseDownBackgroundProperty
+            = DependencyProperty.Register("MouseDownBackground", typeof(Brush), typeof(PathRadioButton));
+
+        /// <summary>  
+        /// 鼠标移上去的字体颜色  
+        /// </summary>  
+        public static readonly DependencyProperty MouseOverForegroundProperty
+            = DependencyProperty.Register("MouseOverForeground", typeof(Brush), typeof(PathRadioButton), new PropertyMetadata(null, null));
+
+        /// <summary>  
+        /// 鼠标按下去的字体颜色  
+        /// </summary>  
+        public static readonly DependencyProperty MouseDownForegroundProperty
+            = DependencyProperty.Register("MouseDownForeground", typeof(Brush), typeof(PathRadioButton), new PropertyMetadata(null, null));
+
+        /// <summary>  
+        /// 鼠标移上去的边框颜色  
+        /// </summary>  
+        public static readonly DependencyProperty MouseOverBorderBrushProperty
+            = DependencyProperty.Register("MouseOverBorderBrush", typeof(Brush), typeof(PathRadioButton), new PropertyMetadata(null, null));
+
+        /// <summary>  
+        /// 鼠标按下去的边框颜色  
+        /// </summary>  
+        public static readonly DependencyProperty MouseDownBorderBrushProperty
+            = DependencyProperty.Register("MouseDownBorderBrush", typeof(Brush), typeof(PathRadioButton), new PropertyMetadata(null, null));
+
+        /// <summary>  
+        /// 圆角  
+        /// </summary>  
+        public static readonly DependencyProperty CornerRadiusProperty
+            = DependencyProperty.Register("CornerRadius", typeof(CornerRadius), typeof(PathRadioButton), null);
+
+        //图标  
+        public static readonly DependencyProperty IconProperty
+            = DependencyProperty.Register("Icon", typeof(Geometry), typeof(PathRadioButton), null);
+
+        //图标填充色  
+        public static readonly DependencyProperty IconFillProperty
+            = DependencyProperty.Register("IconFill", typeof(Brush), typeof(PathRadioButton), null);
+
+        //图标透明度 
+        public static readonly DependencyProperty IconOpacityProperty
+            = DependencyProperty.Register("IconOpacity", typeof(double), typeof(PathRadioButton), null);
+
+        //选中的图标  
+        public static readonly DependencyProperty IconCheckedProperty
+            = DependencyProperty.Register("IconChecked", typeof(Geometry), typeof(PathRadioButton), null);
+
+        //选中的图标填充色   
+        public static readonly DependencyProperty IconCheckedFillProperty
+            = DependencyProperty.Register("IconCheckedFill", typeof(Brush), typeof(PathRadioButton), null);
+
+        //选中的图标的透明度 
+        public static readonly DependencyProperty IconCheckedOpacityProperty
+            = DependencyProperty.Register("IconCheckedOpacity", typeof(double), typeof(PathRadioButton), null);
+
+        //鼠标移上去的图标  
+        public static readonly DependencyProperty IconMouseOverProperty
+            = DependencyProperty.Register("IconMouseOver", typeof(Geometry), typeof(PathRadioButton), null);
+
+        //鼠标移上去的图标填充色   
+        public static readonly DependencyProperty IconMouseOverFillProperty
+            = DependencyProperty.Register("IconMouseOverFill", typeof(Brush), typeof(PathRadioButton), null);
+
+        //鼠标移上去的透明度 
+        public static readonly DependencyProperty IconMouseOverOpacityProperty
+            = DependencyProperty.Register("IconMouseOverOpacity", typeof(double), typeof(PathRadioButton), null);
+
+        //鼠标按下去的图标
+        public static readonly DependencyProperty IconPressProperty
+            = DependencyProperty.Register("IconPress", typeof(Geometry), typeof(PathRadioButton), null);
+
+        //鼠标按下去的图标填充色   
+        public static readonly DependencyProperty IconPressFillProperty
+            = DependencyProperty.Register("IconPressFill", typeof(Brush), typeof(PathRadioButton), null);
+
+        //鼠标按下去的透明度 
+        public static readonly DependencyProperty IconPressOpacityProperty
+            = DependencyProperty.Register("IconPressOpacity", typeof(double), typeof(PathRadioButton), null);
+
+        //图标高度  
+        public static readonly DependencyProperty IconHeightProperty
+            = DependencyProperty.Register("IconHeight", typeof(double), typeof(PathRadioButton), new PropertyMetadata(24.0, null));
+
+        //图标宽度  
+        public static readonly DependencyProperty IconWidthProperty
+            = DependencyProperty.Register("IconWidth", typeof(double), typeof(PathRadioButton), new PropertyMetadata(24.0, null));
+
+        //图标和内容的对齐方式  
+        public static readonly DependencyProperty IconContentOrientationProperty
+            = DependencyProperty.Register("IconContentOrientation", typeof(Orientation), typeof(PathRadioButton), new PropertyMetadata(Orientation.Horizontal, null));
+
+        //图标和内容的距离  
+        public static readonly DependencyProperty IconContentMarginProperty
+            = DependencyProperty.Register("IconContentMargin", typeof(Thickness), typeof(PathRadioButton), new PropertyMetadata(new Thickness(0, 0, 0, 0), null));
+
+        #endregion
+
+        #region 属性包装 
+
+        public Brush MouseOverBackground
+        {
+            get
+            {
+                return (Brush)GetValue(MouseOverBackgroundProperty);
+            }
+            set { SetValue(MouseOverBackgroundProperty, value); }
+        }
+
+        public Brush MouseDownBackground
+        {
+            get
+            {
+                return (Brush)GetValue(MouseDownBackgroundProperty);
+            }
+            set { SetValue(MouseDownBackgroundProperty, value); }
+        }
+
+        public Brush MouseOverForeground
+        {
+            get
+            {
+                return (Brush)GetValue(MouseOverForegroundProperty);
+            }
+            set { SetValue(MouseOverForegroundProperty, value); }
+        }
+
+        public Brush MouseDownForeground
+        {
+            get
+            {
+                return (Brush)GetValue(MouseDownForegroundProperty);
+            }
+            set { SetValue(MouseDownForegroundProperty, value); }
+        }
+
+        public Brush MouseOverBorderBrush
+        {
+            get { return (Brush)GetValue(MouseOverBorderBrushProperty); }
+            set { SetValue(MouseOverBorderBrushProperty, value); }
+        }
+
+        public Brush MouseDownBorderBrush
+        {
+            get { return (Brush)GetValue(MouseDownBorderBrushProperty); }
+            set { SetValue(MouseDownBorderBrushProperty, value); }
+        }
+
+        public CornerRadius CornerRadius
+        {
+            get { return (CornerRadius)GetValue(CornerRadiusProperty); }
+            set { SetValue(CornerRadiusProperty, value); }
+        }
+
+        public Geometry Icon
+        {
+            get { return (Geometry)GetValue(IconProperty); }
+            set { SetValue(IconProperty, value); }
+        }
+
+        public Brush IconFill
+        {
+            get { return (Brush)GetValue(IconFillProperty); }
+            set { SetValue(IconFillProperty, value); }
+        }
+
+        public double IconOpacity
+        {
+            get { return (double)GetValue(IconOpacityProperty); }
+            set { SetValue(IconOpacityProperty, value); }
+        }
+
+        public Geometry IconChecked
+        {
+            get { return (Geometry)GetValue(IconCheckedProperty); }
+            set { SetValue(IconCheckedProperty, value); }
+        }
+
+        public Brush IconCheckedFill
+        {
+            get { return (Brush)GetValue(IconCheckedFillProperty); }
+            set { SetValue(IconCheckedFillProperty, value); }
+        }
+
+        public double IconCheckedOpacity
+        {
+            get { return (double)GetValue(IconCheckedOpacityProperty); }
+            set { SetValue(IconCheckedOpacityProperty, value); }
+        }
+        public Geometry IconMouseOver
+        {
+            get { return (Geometry)GetValue(IconMouseOverProperty); }
+            set { SetValue(IconMouseOverProperty, value); }
+        }
+
+        public Brush IconMouseOverFill
+        {
+            get { return (Brush)GetValue(IconMouseOverProperty); }
+            set { SetValue(IconMouseOverProperty, value); }
+        }
+
+        public double IconMouseOverOpacity
+        {
+            get { return (double)GetValue(IconMouseOverProperty); }
+            set { SetValue(IconMouseOverProperty, value); }
+        }
+
+        public Geometry IconPress
+        {
+            get { return (Geometry)GetValue(IconPressProperty); }
+            set { SetValue(IconPressProperty, value); }
+        }
+
+        public Brush IconPressFill
+        {
+            get { return (Brush)GetValue(IconPressFillProperty); }
+            set { SetValue(IconPressFillProperty, value); }
+        }
+
+        public double IconPressOpacity
+        {
+            get { return (double)GetValue(IconPressOpacityProperty); }
+            set { SetValue(IconPressOpacityProperty, value); }
+        }
+
+        public double IconHeight
+        {
+            get { return (double)GetValue(IconHeightProperty); }
+            set { SetValue(IconHeightProperty, value); }
+        }
+
+        public double IconWidth
+        {
+            get { return (double)GetValue(IconWidthProperty); }
+            set { SetValue(IconWidthProperty, value); }
+        }
+
+        public Orientation IconContentOrientation
+        {
+            get { return (Orientation)GetValue(IconContentOrientationProperty); }
+            set { SetValue(IconContentOrientationProperty, value); }
+        }
+
+        public Thickness IconContentMargin
+        {
+            get { return (Thickness)GetValue(IconContentMarginProperty); }
+            set { SetValue(IconContentMarginProperty, value); }
+        }
+
+        #endregion
+    }
+}

+ 2 - 0
PDF Office/Model/DialogNames.cs

@@ -143,5 +143,7 @@ namespace PDF_Office.Model
         ///转档进度条弹窗
         /// </summary>
         public static string ConverterProgressBarDialog = "ConverterProgressBarDialog";
+
+        public static string EditPresetColorsDialog = "EditPresetColorsDialog";
     }
 }

+ 48 - 0
PDF Office/PDF Office.csproj

@@ -120,6 +120,7 @@
     <Reference Include="office, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c">
       <EmbedInteropTypes>True</EmbedInteropTypes>
     </Reference>
+    <Reference Include="PresentationFramework.Aero2" />
     <Reference Include="Prism, Version=8.1.97.5141, Culture=neutral, PublicKeyToken=40ee6c3a2184dc59, processorArchitecture=MSIL">
       <HintPath>packages\Prism.Core.8.1.97\lib\net461\Prism.dll</HintPath>
     </Reference>
@@ -211,6 +212,7 @@
       <DependentUpon>FormFieldCombox.xaml</DependentUpon>
     </Compile>
     <Compile Include="CustomControl\IconAndTextTabItem.cs" />
+    <Compile Include="CustomControl\ImageRadioButton .cs" />
     <Compile Include="CustomControl\ListBoxItemToolBar.cs" />
     <Compile Include="CustomControl\MenuItemWithPath.cs" />
     <Compile Include="CustomControl\MessageBoxEx.cs" />
@@ -224,6 +226,7 @@
       <DependentUpon>PageTurningPreview.xaml</DependentUpon>
     </Compile>
     <Compile Include="CustomControl\PathButton.cs" />
+    <Compile Include="CustomControl\PathRadioButton.cs" />
     <Compile Include="CustomControl\SystemControl\CustomCommandAction .cs" />
     <Compile Include="CustomControl\SystemControl\RoutedEventTrigger.cs" />
     <Compile Include="CustomControl\TextBoxEx.cs" />
@@ -387,6 +390,7 @@
     <Compile Include="ViewModels\Form\ButtonPropertyViewModel.cs" />
     <Compile Include="ViewModels\Form\CheckBoxPropertyViewModel.cs" />
     <Compile Include="ViewModels\Form\ComboxPropertyViewModel.cs" />
+    <Compile Include="ViewModels\Form\EditPresetColorsDialogViewModel.cs" />
     <Compile Include="ViewModels\Form\FormBaseVM.cs" />
     <Compile Include="ViewModels\Form\FormsToolContentViewModel.cs" />
     <Compile Include="ViewModels\Form\ListBoxPropertyViewModel.cs" />
@@ -596,6 +600,15 @@
     <Compile Include="Views\Dialog\HomePageToolsDialogs\HomePagePrinter\HomePagePrinterDialog.xaml.cs">
       <DependentUpon>HomePagePrinterDialog.xaml</DependentUpon>
     </Compile>
+    <Compile Include="Views\Dialog\Redaction\MarkSettingDialog.xaml.cs">
+      <DependentUpon>MarkSettingDialog.xaml</DependentUpon>
+    </Compile>
+    <Compile Include="Views\Dialog\Redaction\PageMarkDialog.xaml.cs">
+      <DependentUpon>PageMarkDialog.xaml</DependentUpon>
+    </Compile>
+    <Compile Include="Views\Dialog\Redaction\RepeatMarkDialog.xaml.cs">
+      <DependentUpon>RepeatMarkDialog.xaml</DependentUpon>
+    </Compile>
     <Compile Include="Views\Dialog\ToolsDialogs\CompressDialogs\CompressDialog.xaml.cs">
       <DependentUpon>CompressDialog.xaml</DependentUpon>
     </Compile>
@@ -665,6 +678,12 @@
     <Compile Include="Views\Form\ComboxProperty.xaml.cs">
       <DependentUpon>ComboxProperty.xaml</DependentUpon>
     </Compile>
+    <Compile Include="Views\Form\EditPresetColorsDialog.xaml.cs">
+      <DependentUpon>EditPresetColorsDialog.xaml</DependentUpon>
+    </Compile>
+    <Compile Include="Views\Form\EmptyFormProperty.xaml.cs">
+      <DependentUpon>EmptyFormProperty.xaml</DependentUpon>
+    </Compile>
     <Compile Include="Views\Form\FormsToolContent.xaml.cs">
       <DependentUpon>FormsToolContent.xaml</DependentUpon>
       <SubType>Code</SubType>
@@ -948,6 +967,10 @@
       <Generator>MSBuild:Compile</Generator>
       <SubType>Designer</SubType>
     </Page>
+    <Page Include="Styles\ImageRadioButtonDictionary.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
     <Page Include="Styles\ListBoxStyle.xaml">
       <Generator>MSBuild:Compile</Generator>
       <SubType>Designer</SubType>
@@ -968,6 +991,10 @@
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
     </Page>
+    <Page Include="Styles\PathRadioButtonDictionary.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
     <Page Include="Styles\RadioButtonStyle.xaml">
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
@@ -1128,6 +1155,18 @@
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
     </Page>
+    <Page Include="Views\Dialog\Redaction\MarkSettingDialog.xaml">
+      <Generator>MSBuild:Compile</Generator>
+      <SubType>Designer</SubType>
+    </Page>
+    <Page Include="Views\Dialog\Redaction\PageMarkDialog.xaml">
+      <Generator>MSBuild:Compile</Generator>
+      <SubType>Designer</SubType>
+    </Page>
+    <Page Include="Views\Dialog\Redaction\RepeatMarkDialog.xaml">
+      <Generator>MSBuild:Compile</Generator>
+      <SubType>Designer</SubType>
+    </Page>
     <Page Include="Views\EditTools\Bates\BatesContent.xaml">
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
@@ -1196,6 +1235,14 @@
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
     </Page>
+    <Page Include="Views\Form\EditPresetColorsDialog.xaml">
+      <Generator>MSBuild:Compile</Generator>
+      <SubType>Designer</SubType>
+    </Page>
+    <Page Include="Views\Form\EmptyFormProperty.xaml">
+      <Generator>MSBuild:Compile</Generator>
+      <SubType>Designer</SubType>
+    </Page>
     <Page Include="Views\Form\FormsToolContent.xaml">
       <SubType>Designer</SubType>
       <Generator>XamlIntelliSenseFileGenerator</Generator>
@@ -1628,6 +1675,7 @@
       <CopyToOutputDirectory>Always</CopyToOutputDirectory>
     </Content>
     <Resource Include="Resources\EditTools\watermark_bg.png" />
+    <Resource Include="Resources\PropertyPanel\EmptyAnnot.png" />
     <Content Include="source\AnalysisWord\Res\_rels\.rels">
       <CopyToOutputDirectory>Always</CopyToOutputDirectory>
     </Content>

BIN
PDF Office/Resources/PropertyPanel/EmptyAnnot.png


+ 92 - 7
PDF Office/Styles/CustomBtnStyle.xaml

@@ -477,7 +477,7 @@
                             <Setter TargetName="optionMark" Property="Fill" Value="{StaticResource RadioButton.Pressed.Glyph}" />
                         </Trigger>
                         <Trigger Property="IsChecked" Value="true">
-                            <Setter TargetName="optionMark" Property="Opacity" Value="1" />
+                            <Setter  TargetName="radioButtonBorder" Property="Background" Value="Red" />
                             <Setter TargetName="optionMark" Property="Fill" Value="{StaticResource RadioButton.Pressed.Glyph}" />
                         </Trigger>
                         <Trigger Property="IsChecked" Value="{x:Null}">
@@ -498,6 +498,68 @@
         <Setter Property="Height" Value="80" />
         <Setter Property="HorizontalContentAlignment" Value="Center" />
         <Setter Property="VerticalContentAlignment" Value="Center" />
+        <Setter Property="Template">
+            <Setter.Value>
+                <ControlTemplate TargetType="{x:Type RadioButton}">
+                    <Grid
+                        x:Name="templateRoot"
+                        Background="Transparent"
+                        SnapsToDevicePixels="True">
+                        <Border
+                            x:Name="radioButtonBorder"
+                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
+                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
+                            Background="{TemplateBinding Background}"
+                            BorderBrush="{TemplateBinding BorderBrush}"
+                            BorderThickness="{TemplateBinding BorderThickness}"
+                            CornerRadius="4">
+                            <Rectangle
+                                x:Name="optionMark"
+                                Width="{TemplateBinding Width}"
+                                Height="{TemplateBinding Height}"
+                                Opacity="0" />
+                        </Border>
+                        <ContentPresenter
+                            x:Name="contentPresenter"
+                            Margin="{TemplateBinding Padding}"
+                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
+                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
+                            Focusable="False"
+                            RecognizesAccessKey="True"
+                            SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
+                    </Grid>
+                </ControlTemplate>
+            </Setter.Value>
+        </Setter>
+        <Style.Triggers>
+            <Trigger Property="IsMouseOver" Value="true">
+                <Setter Property="Background" Value="{StaticResource RadioButton.MouseOver.Background}" />
+                <Setter Property="BorderBrush" Value="{StaticResource RadioButton.MouseOver.Border}" />
+            </Trigger>
+            <Trigger Property="IsEnabled" Value="false">
+                <Setter Property="Background" Value="{StaticResource RadioButton.Disabled.Background}" />
+                <Setter Property="BorderBrush" Value="{StaticResource RadioButton.Disabled.Border}" />
+            </Trigger>
+            <Trigger Property="IsChecked" Value="True">
+                <Setter Property="Background" Value="{StaticResource color.item-state.sel.bg.lv2}" />
+            </Trigger>
+            <Trigger Property="IsPressed" Value="true">
+                <Setter Property="Background" Value="{StaticResource RadioButton.Pressed.Background}" />
+                <Setter Property="BorderBrush" Value="{StaticResource RadioButton.Pressed.Border}" />
+            </Trigger>
+        </Style.Triggers>
+    </Style>
+
+    <!--带有蓝色边框的单选按钮-->
+    <Style x:Key="BlueBorderRadionButtonWithCorner" TargetType="{x:Type RadioButton}">
+        <Setter Property="Background" Value="Transparent" />
+        <Setter Property="BorderBrush" Value="Transparent" />
+        <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" />
+        <Setter Property="BorderThickness" Value="0" />
+        <Setter Property="Width" Value="72" />
+        <Setter Property="Height" Value="80" />
+        <Setter Property="HorizontalContentAlignment" Value="Center" />
+        <Setter Property="VerticalContentAlignment" Value="Center" />
         <Setter Property="Template">
             <Setter.Value>
                 <ControlTemplate TargetType="{x:Type RadioButton}">
@@ -530,8 +592,6 @@
                     </Grid>
                     <ControlTemplate.Triggers>
                         <Trigger Property="IsMouseOver" Value="true">
-                            <Setter TargetName="radioButtonBorder" Property="Background" Value="{StaticResource RadioButton.MouseOver.Background}" />
-                            <Setter TargetName="radioButtonBorder" Property="BorderBrush" Value="{StaticResource RadioButton.MouseOver.Border}" />
                             <Setter TargetName="optionMark" Property="Fill" Value="{StaticResource RadioButton.MouseOver.Glyph}" />
                         </Trigger>
                         <Trigger Property="IsEnabled" Value="false">
@@ -540,13 +600,11 @@
                             <Setter TargetName="optionMark" Property="Fill" Value="{StaticResource RadioButton.Disabled.Glyph}" />
                         </Trigger>
                         <Trigger Property="IsPressed" Value="true">
-                            <Setter TargetName="radioButtonBorder" Property="Background" Value="{StaticResource RadioButton.Pressed.Background}" />
-                            <Setter TargetName="radioButtonBorder" Property="BorderBrush" Value="{StaticResource RadioButton.Pressed.Border}" />
+
                             <Setter TargetName="optionMark" Property="Fill" Value="{StaticResource RadioButton.Pressed.Glyph}" />
                         </Trigger>
                         <Trigger Property="IsChecked" Value="true">
-                            <Setter TargetName="optionMark" Property="Opacity" Value="1" />
-                            <Setter TargetName="optionMark" Property="Fill" Value="{StaticResource RadioButton.Pressed.Glyph}" />
+                            <Setter TargetName="radioButtonBorder" Property="BorderBrush" Value="blue" />
                         </Trigger>
                         <Trigger Property="IsChecked" Value="{x:Null}">
                             <Setter TargetName="optionMark" Property="Opacity" Value="0.56" />
@@ -557,6 +615,33 @@
         </Setter>
     </Style>
 
+    <!--  Design Token SubToolbar lv2 radionbutton  -->
+    <Style
+        x:Key="SubToolbarRdb"
+        BasedOn="{StaticResource RectangleRadionButtonWithCorner}"
+        TargetType="{x:Type RadioButton}">
+        <Setter Property="Background" Value="Transparent" />
+        <Setter Property="FontSize" Value="12" />
+        <Setter Property="FontFamily" Value="Segoe UI" />
+        <Setter Property="Foreground" Value="{StaticResource color.sys.text.neutral.lv1}" />
+        <Setter Property="BorderThickness" Value="0" />
+        <!--<Style.Triggers>
+            <Trigger Property="IsMouseOver" Value="True">
+                <Setter Property="Background" Value="{StaticResource color.item-state.sel.bg.lv2}" />
+            </Trigger>
+            <Trigger Property="IsPressed" Value="True">
+                <Setter Property="Background" Value="{StaticResource color.item-state.sel.bg.lv2}" />
+            </Trigger>
+            <Trigger Property="IsChecked" Value="True">
+                <Setter Property="Background" Value="{StaticResource color.item-state.sel.bg.lv2}" />
+            </Trigger>
+            <Trigger Property="IsEnabled" Value="False">
+                <Setter Property="Background" Value="Transparent" />
+                <Setter Property="Foreground" Value="{StaticResource color.sys.text.neutral.dis}" />
+            </Trigger>
+        </Style.Triggers>-->
+    </Style>
+
     <Style x:Key="HomePageCompressBtn" TargetType="Button">
         <Setter Property="Background" Value="White" />
         <Setter Property="BorderBrush" Value="White" />

+ 115 - 0
PDF Office/Styles/ImageRadioButtonDictionary.xaml

@@ -0,0 +1,115 @@
+<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+                    xmlns:customControl="clr-namespace:PDF_Office.CustomControl">
+
+    <Style TargetType="{x:Type customControl:ImageRadioButton}">
+        <Setter Property="Background" Value="Transparent" />
+        <Setter Property="Template">
+            <Setter.Value>
+                <ControlTemplate TargetType="{x:Type customControl:ImageRadioButton}">
+
+                    <Border
+                        Background="{TemplateBinding Background}"
+                        BorderBrush="{TemplateBinding BorderBrush}"
+                        BorderThickness="{TemplateBinding BorderThickness}">
+                        <Grid x:Name="grid" Background="{TemplateBinding Background}">
+                            <Border
+                                x:Name="PART_Border"
+                                Background="{TemplateBinding Background}"
+                                BorderBrush="{TemplateBinding BorderBrush}"
+                                BorderThickness="{TemplateBinding BorderThickness}"
+                                CornerRadius="{TemplateBinding CornerRadius}" />
+
+                            <Grid HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}">
+                                <StackPanel
+                                    Margin="{TemplateBinding Padding}"
+                                    HorizontalAlignment="Center"
+                                    VerticalAlignment="Center"
+                                    Orientation="{TemplateBinding IconContentOrientation}">
+                                    <Grid HorizontalAlignment="Center" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
+                                        <Image
+                                            x:Name="PART_Icon"
+                                            Width="{TemplateBinding IconWidth}"
+                                            Height="{TemplateBinding IconHeight}"
+                                            Source="{TemplateBinding Icon}" />
+                                        <Image
+                                            x:Name="PART_MouseOverIcon"
+                                            Width="{TemplateBinding IconWidth}"
+                                            Height="{TemplateBinding IconHeight}"
+                                            Source="{TemplateBinding IconMouseOver}"
+                                            Visibility="Collapsed" />
+                                        <Image
+                                            x:Name="PART_PressIcon"
+                                            Width="{TemplateBinding IconWidth}"
+                                            Height="{TemplateBinding IconHeight}"
+                                            Source="{TemplateBinding IconPress}"
+                                            Visibility="Collapsed" />
+                                        <Image
+                                            x:Name="PART_CheckedIcon"
+                                            Width="{TemplateBinding IconWidth}"
+                                            Height="{TemplateBinding IconHeight}"
+                                            Source="{TemplateBinding IconChecked}"
+                                            Visibility="Collapsed" />
+                                    </Grid>
+                                    <TextBlock
+                                        x:Name="PART_Content"
+                                        Margin="{TemplateBinding IconContentMargin}"
+                                        HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
+                                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
+                                        Foreground="{TemplateBinding Foreground}"
+                                        SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
+                                        Text="{TemplateBinding Content}"
+                                        TextTrimming="CharacterEllipsis" />
+                                </StackPanel>
+                            </Grid>
+                        </Grid>
+                    </Border>
+
+                    <ControlTemplate.Triggers>
+                        <Trigger Property="IsMouseOver" Value="True">
+                            <Setter TargetName="PART_Content" Property="Foreground" Value="{Binding MouseOverForeground, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type customControl:ImageRadioButton}}}" />
+                            <Setter TargetName="PART_Border" Property="Background" Value="{Binding MouseOverBackground, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type customControl:ImageRadioButton}}}" />
+                            <Setter TargetName="PART_Border" Property="BorderBrush" Value="{Binding MouseOverBorderBrush, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type customControl:ImageRadioButton}}}" />
+                            <Setter TargetName="PART_MouseOverIcon" Property="Visibility" Value="Visible" />
+                            <Setter TargetName="PART_Icon" Property="Visibility" Value="Collapsed" />
+                            <Setter TargetName="PART_PressIcon" Property="Visibility" Value="Collapsed" />
+                            <Setter TargetName="PART_CheckedIcon" Property="Visibility" Value="Collapsed" />
+                        </Trigger>
+
+                        <Trigger Property="IsPressed" Value="True">
+                            <Setter TargetName="PART_Content" Property="Foreground" Value="{Binding MouseDownForeground, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type customControl:ImageRadioButton}}}" />
+                            <Setter TargetName="PART_Border" Property="Background" Value="{Binding MouseDownBackground, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type customControl:ImageRadioButton}}}" />
+                            <Setter TargetName="PART_Border" Property="BorderBrush" Value="{Binding MouseDownBorderBrush, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type customControl:ImageRadioButton}}}" />
+                            <Setter TargetName="PART_PressIcon" Property="Visibility" Value="Visible" />
+                            <Setter TargetName="PART_Icon" Property="Visibility" Value="Collapsed" />
+                            <Setter TargetName="PART_MouseOverIcon" Property="Visibility" Value="Collapsed" />
+                            <Setter TargetName="PART_CheckedIcon" Property="Visibility" Value="Collapsed" />
+                        </Trigger>
+
+                        <Trigger Property="IsEnabled" Value="False">
+                            <Setter Property="Opacity" Value="0.5" />
+                        </Trigger>
+
+                        <Trigger Property="IsChecked" Value="True">
+                            <Setter TargetName="PART_Content" Property="Foreground" Value="{Binding MouseOverForeground, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type customControl:ImageRadioButton}}}" />
+                            <Setter TargetName="PART_Border" Property="Background" Value="{Binding MouseOverBackground, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type customControl:ImageRadioButton}}}" />
+                            <Setter TargetName="PART_Border" Property="BorderBrush" Value="{Binding MouseOverBorderBrush, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type customControl:ImageRadioButton}}}" />
+                            <Setter TargetName="PART_MouseOverIcon" Property="Visibility" Value="Collapsed" />
+                            <Setter TargetName="PART_Icon" Property="Visibility" Value="Collapsed" />
+                            <Setter TargetName="PART_PressIcon" Property="Visibility" Value="Collapsed" />
+                            <Setter TargetName="PART_CheckedIcon" Property="Visibility" Value="Visible" />
+                        </Trigger>
+
+                        <Trigger SourceName="PART_Content" Property="Text" Value="">
+                            <Setter TargetName="PART_Content" Property="Visibility" Value="Collapsed" />
+                        </Trigger>
+
+                        <Trigger SourceName="PART_Content" Property="Text" Value="{x:Null}">
+                            <Setter TargetName="PART_Content" Property="Visibility" Value="Collapsed" />
+                        </Trigger>
+                    </ControlTemplate.Triggers>
+                </ControlTemplate>
+            </Setter.Value>
+        </Setter>
+    </Style>
+</ResourceDictionary>

+ 126 - 0
PDF Office/Styles/PathRadioButtonDictionary.xaml

@@ -0,0 +1,126 @@
+<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+                    xmlns:customControl="clr-namespace:PDF_Office.CustomControl">
+    <Style TargetType="{x:Type customControl:PathRadioButton}" >
+        <Setter Property="IconOpacity" Value="1" />
+        <Setter Property="IconMouseOverOpacity" Value="1" />
+        <Setter Property="IconPressOpacity" Value="1" />
+        <Setter Property="IconCheckedOpacity" Value="1" />
+        <Setter Property="Background" Value="Transparent" />
+        <Setter Property="Template">
+            <Setter.Value>
+                <ControlTemplate TargetType="{x:Type customControl:PathRadioButton}">
+
+                    <Border
+                        Background="{TemplateBinding Background}"
+                        BorderBrush="{TemplateBinding BorderBrush}"
+                        BorderThickness="{TemplateBinding BorderThickness}">
+                        <Grid x:Name="grid" Background="{TemplateBinding Background}">
+                            <Border
+                                x:Name="PART_Border"
+                                Background="{TemplateBinding Background}"
+                                BorderBrush="{TemplateBinding BorderBrush}"
+                                BorderThickness="{TemplateBinding BorderThickness}"
+                                CornerRadius="{TemplateBinding CornerRadius}" />
+
+                            <Grid HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}">
+                                <StackPanel
+                                    Margin="{TemplateBinding Padding}"
+                                    HorizontalAlignment="Center"
+                                    VerticalAlignment="Center"
+                                    Orientation="{TemplateBinding IconContentOrientation}">
+                                    <Grid HorizontalAlignment="Center" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
+                                        <Path
+                                            x:Name="PART_Icon"
+                                            Width="{TemplateBinding IconWidth}"
+                                            Height="{TemplateBinding IconHeight}"
+                                            Data="{TemplateBinding Icon}"
+                                            Fill="{TemplateBinding IconFill}"
+                                            Opacity="{TemplateBinding IconOpacity}" />
+                                        <Path
+                                            x:Name="PART_MouseOverIcon"
+                                            Width="{TemplateBinding IconWidth}"
+                                            Height="{TemplateBinding IconHeight}"
+                                            Data="{TemplateBinding IconMouseOver}"
+                                            Fill="{TemplateBinding IconMouseOverFill}"
+                                            Opacity="{TemplateBinding IconMouseOverOpacity}"
+                                            Visibility="Collapsed" />
+                                        <Path
+                                            x:Name="PART_PressIcon"
+                                            Width="{TemplateBinding IconWidth}"
+                                            Height="{TemplateBinding IconHeight}"
+                                            Data="{TemplateBinding IconPress}"
+                                            Fill="{TemplateBinding IconPressFill}"
+                                            Opacity="{TemplateBinding IconPressOpacity}"
+                                            Visibility="Collapsed" />
+                                        <Path
+                                            x:Name="PART_CheckedIcon"
+                                            Width="{TemplateBinding IconWidth}"
+                                            Height="{TemplateBinding IconHeight}"
+                                            Data="{TemplateBinding IconChecked}"
+                                            Fill="{TemplateBinding IconCheckedFill}"
+                                            Opacity="{TemplateBinding IconCheckedOpacity}"
+                                            Visibility="Collapsed" />
+                                    </Grid>
+                                    <TextBlock
+                                        x:Name="PART_Content"
+                                        Margin="{TemplateBinding IconContentMargin}"
+                                        HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
+                                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
+                                        Foreground="{TemplateBinding Foreground}"
+                                        SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
+                                        Text="{TemplateBinding Content}"
+                                        TextTrimming="CharacterEllipsis" />
+                                </StackPanel>
+                            </Grid>
+                        </Grid>
+                    </Border>
+
+                    <ControlTemplate.Triggers>
+                        <Trigger Property="IsMouseOver" Value="True">
+                            <Setter TargetName="PART_Content" Property="Foreground" Value="{Binding MouseOverForeground, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type customControl:PathRadioButton}}}" />
+                            <Setter TargetName="PART_Border" Property="Background" Value="{Binding MouseOverBackground, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type customControl:PathRadioButton}}}" />
+                            <Setter TargetName="PART_Border" Property="BorderBrush" Value="{Binding MouseOverBorderBrush, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type customControl:PathRadioButton}}}" />
+                            <Setter TargetName="PART_MouseOverIcon" Property="Visibility" Value="Visible" />
+                            <Setter TargetName="PART_Icon" Property="Visibility" Value="Collapsed" />
+                            <Setter TargetName="PART_PressIcon" Property="Visibility" Value="Collapsed" />
+                            <Setter TargetName="PART_CheckedIcon" Property="Visibility" Value="Collapsed" />
+                        </Trigger>
+
+                        <Trigger Property="IsPressed" Value="True">
+                            <Setter TargetName="PART_Content" Property="Foreground" Value="{Binding MouseDownForeground, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type customControl:PathRadioButton}}}" />
+                            <Setter TargetName="PART_Border" Property="Background" Value="{Binding MouseDownBackground, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type customControl:PathRadioButton}}}" />
+                            <Setter TargetName="PART_Border" Property="BorderBrush" Value="{Binding MouseDownBorderBrush, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type customControl:PathRadioButton}}}" />
+                            <Setter TargetName="PART_PressIcon" Property="Visibility" Value="Visible" />
+                            <Setter TargetName="PART_Icon" Property="Visibility" Value="Collapsed" />
+                            <Setter TargetName="PART_MouseOverIcon" Property="Visibility" Value="Collapsed" />
+                            <Setter TargetName="PART_CheckedIcon" Property="Visibility" Value="Collapsed" />
+                        </Trigger>
+
+                        <Trigger Property="IsEnabled" Value="False">
+                            <Setter Property="Opacity" Value="0.5" />
+                        </Trigger>
+
+                        <Trigger Property="IsChecked" Value="True">
+                            <Setter TargetName="PART_Content" Property="Foreground" Value="{Binding MouseOverForeground, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type customControl:PathRadioButton}}}" />
+                            <Setter TargetName="PART_Border" Property="Background" Value="{Binding MouseOverBackground, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type customControl:PathRadioButton}}}" />
+                            <Setter TargetName="PART_Border" Property="BorderBrush" Value="{Binding MouseOverBorderBrush, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type customControl:PathRadioButton}}}" />
+                            <Setter TargetName="PART_MouseOverIcon" Property="Visibility" Value="Collapsed" />
+                            <Setter TargetName="PART_Icon" Property="Visibility" Value="Collapsed" />
+                            <Setter TargetName="PART_PressIcon" Property="Visibility" Value="Collapsed" />
+                            <Setter TargetName="PART_CheckedIcon" Property="Visibility" Value="Visible" />
+                        </Trigger>
+                        <Trigger SourceName="PART_Content" Property="Text" Value="">
+                            <Setter TargetName="PART_Content" Property="Visibility" Value="Collapsed" />
+                        </Trigger>
+
+                        <Trigger SourceName="PART_Content" Property="Text" Value="{x:Null}">
+                            <Setter TargetName="PART_Content" Property="Visibility" Value="Collapsed" />
+                        </Trigger>
+                    </ControlTemplate.Triggers>
+                </ControlTemplate>
+            </Setter.Value>
+        </Setter>
+    </Style>
+    
+</ResourceDictionary>

+ 1 - 0
PDF Office/Styles/TabControlStyle.xaml

@@ -483,6 +483,7 @@
                         <Border
                             Grid.Row="0"
                             Grid.Column="0"
+                            HorizontalAlignment="Center"
                             Background="{StaticResource color.sys.layout.fg.dark}"
                             CornerRadius="4">
                             <TabPanel

+ 1 - 1
PDF Office/Styles/ToggleButton.xaml

@@ -1,6 +1,6 @@
 <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
     <!--  Design Token for subtool  -->
-    <Style x:Key="subToobar" TargetType="{x:Type ToggleButton}">
+    <Style x:Key="SubToolbarTgb" TargetType="{x:Type ToggleButton}">
         <Setter Property="FocusVisualStyle" Value="{x:Null}" />
         <Setter Property="Background" Value="Transparent" />
         <Setter Property="BorderThickness" Value="0" />

+ 10 - 11
PDF Office/Themes/Generic.xaml

@@ -12,26 +12,25 @@
                     <Border Background="White" CornerRadius="8">
                         <Grid Background="Transparent">
                             <Grid.RowDefinitions>
-                                <RowDefinition Height="48" />
+                                <RowDefinition Height="50" />
                                 <RowDefinition Height="*" />
                                 <RowDefinition Height="64" />
                             </Grid.RowDefinitions>
-                            <Border Background="Transparent" BorderThickness="0,0,0,1">
-                                <Border.BorderBrush>
-                                    <SolidColorBrush Opacity="0.2" Color="Gray" />
-                                </Border.BorderBrush>
+                            <Border Background="Transparent">
                                 <TextBlock
-                                    Margin="16,0,0,0"
+                                    Margin="16,0"
                                     VerticalAlignment="Center"
                                     FontSize="16"
                                     FontWeight="SemiBold"
                                     Text="{TemplateBinding Header}" />
                             </Border>
-                            <ContentPresenter Grid.Row="1" Content="{TemplateBinding Content}" />
-                            <Border Grid.Row="2" BorderThickness="0,1,0,0">
-                                <Border.BorderBrush>
-                                    <SolidColorBrush Opacity="0.2" Color="Gray" />
-                                </Border.BorderBrush>
+                            <ContentPresenter
+                                Grid.Row="1"
+                                Content="{TemplateBinding Content}"
+                                Focusable="False"
+                                RecognizesAccessKey="True"
+                                SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
+                            <Border Grid.Row="2">
                                 <ContentControl Content="{TemplateBinding BottmBar}" />
                             </Border>
                         </Grid>

+ 82 - 0
PDF Office/ViewModels/Form/EditPresetColorsDialogViewModel.cs

@@ -0,0 +1,82 @@
+using Prism.Mvvm;
+using Prism.Regions;
+using Prism.Services.Dialogs;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Media;
+
+namespace PDF_Office.ViewModels.Form
+{
+    public class EditPresetColorsDialogViewModel : BindableBase, IDialogAware
+    {
+        private SolidColorBrush _borderColor;
+        public SolidColorBrush BorderColor
+        {
+            get { return _borderColor; }
+            set { SetProperty(ref _borderColor, value); }
+        }
+
+        private SolidColorBrush _fontColor;
+        public SolidColorBrush FontColor
+        {
+            get { return _fontColor; }
+            set { SetProperty(ref _fontColor, value); }
+        }
+
+
+        private SolidColorBrush _fillColor;
+        public SolidColorBrush FillColor
+        {
+            get { return _fillColor; }
+            set { SetProperty(ref _fillColor, value); }
+        }
+        public EditPresetColorsDialogViewModel()
+        {
+            BorderColor = new SolidColorBrush(Colors.Transparent);
+            FontColor = new SolidColorBrush(Color.FromArgb(0xFF, 0x00, 0x00, 0x00));
+            FillColor = new SolidColorBrush(Color.FromArgb(0xFF, 0x00, 0x00, 0x00));
+        }
+
+        public string Title => "";
+
+        public event Action<IDialogResult> RequestClose;
+
+        public bool CanCloseDialog()
+        {
+            return true;
+        }
+
+
+        #region Navegation
+        public bool IsNavigationTarget(NavigationContext navigationContext)
+        {
+            return true;
+        }
+
+        public void OnDialogClosed()
+        {
+            return;
+        }
+
+        public void OnDialogOpened(IDialogParameters parameters)
+        {
+            return;
+        }
+
+        public void OnNavigatedFrom(NavigationContext navigationContext)
+        {
+            
+        }
+
+        public void OnNavigatedTo(NavigationContext navigationContext)
+        {
+           
+        }
+
+        #endregion
+
+    }
+}

+ 44 - 12
PDF Office/ViewModels/Form/FormBaseVM.cs

@@ -35,14 +35,15 @@ namespace PDF_Office.ViewModels.Form
         public string ToolTipStr
         {
             get { return _toolTipStr; }
-            set { SetProperty(ref _toolTipStr, value); ChangeValueHandler?.Invoke(null, FormAttributeType.ToolTip); }
+            set { SetProperty(ref _toolTipStr, value); ChangeValueHandler?.Invoke(value, FormAttributeType.ToolTip); }
         }
+
         //名称
         private string _nameStr;
         public string NameStr
         {
             get { return _nameStr; }
-            set { SetProperty(ref _nameStr, value); ChangeValueHandler?.Invoke(null, FormAttributeType.Name); }
+            set { SetProperty(ref _nameStr, value); ChangeValueHandler?.Invoke(value, FormAttributeType.Name); }
         }
 
         //只读
@@ -50,7 +51,7 @@ namespace PDF_Office.ViewModels.Form
         public bool IsReadOnly
         {
             get { return _isReadOnly; }
-            set { SetProperty(ref _isReadOnly, value); ChangeValueHandler?.Invoke(null, FormAttributeType.IsReadOnly); }
+            set { SetProperty(ref _isReadOnly, value); ChangeValueHandler?.Invoke(value, FormAttributeType.IsReadOnly); }
         }
 
         //必填
@@ -58,14 +59,15 @@ namespace PDF_Office.ViewModels.Form
         public bool IsRequiredField
         {
             get { return _isRequiredField; }
-            set { SetProperty(ref _isRequiredField, value); ChangeValueHandler?.Invoke(null, FormAttributeType.IsRequiredField); }
+            set { SetProperty(ref _isRequiredField, value); ChangeValueHandler?.Invoke(value, FormAttributeType.IsRequiredField); }
         }
+
         //锁定
         public bool _isLocked = false;
         public bool IsLocked
         {
             get { return _isLocked; }
-            set { SetProperty(ref _isLocked, value); ChangeValueHandler?.Invoke(null, FormAttributeType.IsLocked); }
+            set { SetProperty(ref _isLocked, value); ChangeValueHandler?.Invoke(value, FormAttributeType.IsLocked); }
         }
 
         #endregion
@@ -76,45 +78,75 @@ namespace PDF_Office.ViewModels.Form
         public double BorderThiness
         {
             get { return _borderThiness; }
-            set { SetProperty(ref _borderThiness, value); ChangeValueHandler?.Invoke(null, FormAttributeType.BorderThiness); }
+            set { SetProperty(ref _borderThiness, value); ChangeValueHandler?.Invoke(value, FormAttributeType.BorderThiness); }
         }
+
         //是否为实线条
         private ComPDFKit.PDFAnnotation.C_BORDER_STYLE _isSolid = ComPDFKit.PDFAnnotation.C_BORDER_STYLE.BS_SOLID;
         public ComPDFKit.PDFAnnotation.C_BORDER_STYLE IsSolid
         {
             get { return _isSolid; }
-            set { SetProperty(ref _isSolid, value); ChangeValueHandler?.Invoke(null, FormAttributeType.IsSolid); }
+            set { SetProperty(ref _isSolid, value); ChangeValueHandler?.Invoke(value, FormAttributeType.IsSolid); }
         }
+
         //宽大小
         private double _widthSize = 150;
         public double WidthSize
         {
             get { return _widthSize; }
-            set { SetProperty(ref _widthSize, value); ChangeValueHandler?.Invoke(null, FormAttributeType.WidthSize); }
+            set { SetProperty(ref _widthSize, value); ChangeValueHandler?.Invoke(value, FormAttributeType.WidthSize); }
         }
+
         //高大小
         private double _heightSize = 22;
         public double HeightSize
         {
             get { return _heightSize; }
-            set { SetProperty(ref _heightSize, value); ChangeValueHandler?.Invoke(null, FormAttributeType.HeightSize); }
+            set { SetProperty(ref _heightSize, value); ChangeValueHandler?.Invoke(value, FormAttributeType.HeightSize); }
         }
+
         //边框颜色
         private Color _borderColor = Colors.Transparent;
         public Color BorderColor
         {
             get { return _borderColor; }
-            set { SetProperty(ref _borderColor, value); ChangeValueHandler?.Invoke(null, FormAttributeType.BorderColor); }
+            set { SetProperty(ref _borderColor, value); ChangeValueHandler?.Invoke(value, FormAttributeType.BorderColor); }
         }
+
+
         //内容颜色
         private Color _contentColor = Colors.Transparent;
         public Color ContentColor
         {
             get { return _contentColor; }
-            set { SetProperty(ref _contentColor, value); ChangeValueHandler?.Invoke(null, FormAttributeType.ContentColor); }
+            set { SetProperty(ref _contentColor, value); ChangeValueHandler?.Invoke(value, FormAttributeType.ContentColor); }
         }
 
-
         #endregion
     }
+
+    public class ResetColor: BindableBase
+    {
+        private SolidColorBrush _borderColor;
+        public SolidColorBrush BorderColor
+        {
+            get { return _borderColor; }
+            set { SetProperty(ref _borderColor, value); }
+        }
+
+        private SolidColorBrush _fontColor;
+        public SolidColorBrush FontColor
+        {
+            get { return _fontColor; }
+            set { SetProperty(ref _fontColor, value); }
+        }
+
+
+        private SolidColorBrush _fillColor;
+        public SolidColorBrush FillColor
+        {
+            get { return _fillColor; }
+            set { SetProperty(ref _fillColor, value); }
+        }
+    }
 }

+ 29 - 6
PDF Office/ViewModels/Form/FormsToolContentViewModel.cs

@@ -73,6 +73,7 @@ namespace PDF_Office.ViewModels.Form
 
         private void InitBtnToProperty()
         {
+            btnToProperty.Add("EmptyForm", "EmptyFormProperty");
             btnToProperty.Add("Text", "TextFieldProperty");
             btnToProperty.Add("CheckBox", "CheckBoxProperty");
             btnToProperty.Add("RadioButton", "RadioButtonProperty");
@@ -187,6 +188,7 @@ namespace PDF_Office.ViewModels.Form
         #region 表单内部触发的事件(比如选中表单行为等)
         private void PDFViewer_WidgetClickHander(object sender, WidgetArgs e)
         {
+            //点击表单,签名表单,触发事件
             if (e != null)
             {
 
@@ -196,12 +198,24 @@ namespace PDF_Office.ViewModels.Form
         {
             if (e != null)
             {
-
+               // 选中时
                 var annotHandlerEventArgs = e.AnnotItemsList[0];
                 if (annotHandlerEventArgs as WidgetArgs != null)
                 {
                     var widgetArgs = annotHandlerEventArgs as WidgetArgs;
-                    GetSelectWidget(widgetArgs,e);
+
+                    //新建的表单之后;
+                    if (CurrentWidgetArgs != null &&
+                        CurrentWidgetArgs.AnnotIndex == widgetArgs.AnnotIndex  &&
+                        CurrentWidgetArgs.PageIndex == widgetArgs.PageIndex)
+                    {
+                        GetSelectWidget(widgetArgs, e);
+                        return;
+                    }
+
+                    CurrentWidgetArgs = widgetArgs;
+
+                    GetSelectWidget(widgetArgs, e);
                     UncheckedToolsBtnEvent?.Invoke(null, CurrentToolBtnType);
                     CurrentToolBtnType = "";
                 }
@@ -210,16 +224,25 @@ namespace PDF_Office.ViewModels.Form
 
         }
 
+        public WidgetArgs CurrentWidgetArgs;
         private void PDFViewer_AnnotEditHandler(object sender, List<AnnotEditEvent> e)
         {
            if(e != null && e.Count > 0)
             {
-                var widgeArgs = e[0].EditAnnotArgs as WidgetArgs;
-                if(widgeArgs != null)
+            
+                var widgeArgs = e[e.Count - 1].EditAnnotArgs as WidgetArgs;
+                if (widgeArgs != null)
                 {
-                    
-                 //   GetSelectWidget(widgeArgs,e[0]);
+                    CurrentWidgetArgs = widgeArgs;
                 }
+                AnnotEditEvent editEvent = e[e.Count - 1];
+                //新增表单后,选中
+                if (editEvent.EditAction == ActionType.Add)
+                {
+                    PDFViewer.SelectAnnotation(editEvent.PageIndex, editEvent.AnnotIndex);
+                }
+               
+
             }
         }
 

+ 349 - 13
PDF Office/ViewModels/Form/TextFieldPropertyViewModel.cs

@@ -1,4 +1,5 @@
-using ComPDFKitViewer;
+using ComPDFKit.PDFAnnotation;
+using ComPDFKitViewer;
 using ComPDFKitViewer.AnnotEvent;
 using ComPDFKitViewer.PdfViewer;
 using PDF_Office.Helper;
@@ -7,11 +8,14 @@ using PDF_Office.Model.From;
 using Prism.Commands;
 using Prism.Mvvm;
 using Prism.Regions;
+using Prism.Services.Dialogs;
 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.Media;
 
 namespace PDF_Office.ViewModels.Form
@@ -44,7 +48,7 @@ namespace PDF_Office.ViewModels.Form
         public bool IsMultiLine
         {
             get { return _isMultiline; }
-            set { SetProperty(ref _isMultiline, value); }
+            set { SetProperty(ref _isMultiline, value); ChangeFieldValue("IsMultiLine"); }
         }
 
         //滚动显示长文本
@@ -52,11 +56,75 @@ namespace PDF_Office.ViewModels.Form
         public bool IsScrollText
         {
             get { return _isScrollText; }
-            set { SetProperty(ref _isScrollText, value); }
+            set { SetProperty(ref _isScrollText, value); ChangeFieldValue("IsScrollText"); }
         }
 
+        private ResetColor _resetColorOne = new ResetColor();
+        public ResetColor ResetColorOne
+        {
+            get { return _resetColorOne; }
+            set { SetProperty(ref _resetColorOne, value); }
+        }
+
+        private ResetColor _resetColorTwo = new ResetColor();
+        public ResetColor ResetColorTwo
+        {
+            get { return _resetColorTwo; }
+            set { SetProperty(ref _resetColorTwo, value); }
+        }
+
+        private ResetColor _resetColorThree = new ResetColor();
+        public ResetColor ResetColorThree
+        {
+            get { return _resetColorThree; }
+            set { SetProperty(ref _resetColorThree, value); }
+        }
+
+        private ResetColor _resetColorForth = new ResetColor();
+        public ResetColor ResetColorForth
+        {
+            get { return _resetColorForth; }
+            set { SetProperty(ref _resetColorForth, value); }
+        }
+
+
         #endregion
 
+        private FontFamily _fontFamily;
+        public FontFamily FontFamilyItem
+        {
+            get { return _fontFamily; }
+            set { SetProperty(ref _fontFamily, value); ChangeFieldValue("FontFamilyItem"); }
+        }
+
+        private FontStyle _fontStyle;
+        public FontStyle FontStyleItem
+        {
+            get { return _fontStyle; }
+            set { SetProperty(ref _fontStyle, value); ChangeFieldValue("FontStyleItem"); }
+        }
+
+        private FontWeight _fontWeight;
+        public FontWeight FontWeightItem
+        {
+            get { return _fontWeight; }
+            set { SetProperty(ref _fontWeight, value); ChangeFieldValue("FontWeightItem"); }
+        }
+
+        private C_TEXT_ALIGNMENT _textAlignment;
+        public C_TEXT_ALIGNMENT TextAlignmentItem
+        {
+            get { return _textAlignment; }
+            set { SetProperty(ref _textAlignment, value); ChangeFieldValue("TextAlignmentItem"); }
+        }
+
+        private string _content;
+        public string FormContent
+        {
+            get { return _content; }
+            set { SetProperty(ref _content, value); ChangeFieldValue("FormContent"); }
+        }
+
         #endregion
 
         #region Command变量
@@ -65,25 +133,67 @@ namespace PDF_Office.ViewModels.Form
 
         public DelegateCommand<object> IsReadOnlyCheckedCommand { get; set; }
         public DelegateCommand<object> RequiredFieldCheckedCommand { get; set; }
-        
+
+        //外观
+        public DelegateCommand<object> ThicknessChangedCommand { get; set; }
+
+        public DelegateCommand<object> ResetColorCommand { get; set; }
+        public DelegateCommand<object> ResetColorCheckedBtnCommand { get; set; }
+        public DelegateCommand<object> FontFamilyChangedCommand { get; set; }
+        public DelegateCommand<object> FontStyleChangedCommand { get; set; }
+
+        public DelegateCommand<object> AlignmentChangedCommand { get; set; }
+        public DelegateCommand<string> FormContentTextChangedCommand { get; set; }
+
+        public DelegateCommand<object> IsMultiLineCheckedCommand { get; set; }
+        public DelegateCommand<object> IsScrollToDisplayCheckedCommand { get; set; }
         #endregion
 
         #region 变量
+        public UpdateAttributeHelper AttribEvent;
         private CPDFViewer PDFViewer;
         private WidgetTextBoxArgs textBoxArgs;
-        public UpdateAttributeHelper AttribEvent;
+        private bool IsCurrentWidget = false;
+        private IDialogService dialogs;
+
         #endregion
 
         #region 初始化
-        public TextFieldPropertyViewModel()
+        public TextFieldPropertyViewModel(IDialogService dialogService)
         {
+            dialogs = dialogService;
             InitVariable();
             InitCommand();
         }
 
         private void InitVariable()
         {
+            ResetColorOne = new ResetColor() { 
+                BorderColor = new SolidColorBrush(Colors.Transparent),
+                FontColor = new SolidColorBrush(Color.FromArgb(0xFF, 0x00, 0x00, 0x00)),
+                FillColor = new SolidColorBrush(Color.FromArgb(0xFF, 0x00, 0x00, 0x00))
+            };
+
+            ResetColorTwo = new ResetColor()
+            {
+                BorderColor = new SolidColorBrush(Color.FromArgb(0xFF, 0x00, 0x00, 0x00)),
+                FontColor = new SolidColorBrush(Color.FromArgb(0xFF, 0x00, 0x00, 0x00)),
+                FillColor = new SolidColorBrush(Color.FromArgb(0xFF, 0x00, 0x00, 0x00))
+            };
+
+            ResetColorThree = new ResetColor()
+            {
+                BorderColor = new SolidColorBrush(Color.FromArgb(0xFF, 0x00, 0x00, 0x00)),
+                FontColor = new SolidColorBrush(Color.FromArgb(0xFF, 0x00, 0x00, 0x00)),
+                FillColor = new SolidColorBrush(Color.FromArgb(0xFF, 0xBD, 0xDF, 0xFD))
+            };
 
+            ResetColorForth = new ResetColor()
+            {
+                BorderColor = new SolidColorBrush(Color.FromArgb(0xFF, 0xff, 0x00, 0x00)),
+                FontColor = new SolidColorBrush(Color.FromArgb(0xFF, 0xff, 0x00, 0x00)),
+                FillColor = new SolidColorBrush(Colors.Transparent)
+            };
         }
 
         private void InitCommand()
@@ -92,11 +202,195 @@ namespace PDF_Office.ViewModels.Form
             ToolTipTextChangedCommand = new DelegateCommand<string>(ToolTipTextChanged);
             IsReadOnlyCheckedCommand = new DelegateCommand<object>(IsReadOnlyChecked);
             RequiredFieldCheckedCommand = new DelegateCommand<object>(RequiredFieldChecked);
-
+            //外观
+            ThicknessChangedCommand = new DelegateCommand<object>(ThicknessChanged);
+            ResetColorCommand = new DelegateCommand<object>(ResetColorEvent);
+
+            ResetColorCheckedBtnCommand = new DelegateCommand<object>(ResetColorCheckedBtn);
+            FontFamilyChangedCommand = new DelegateCommand<object>(FontFamilyChanged);
+            FontStyleChangedCommand = new DelegateCommand<object>(FontStyleChanged);
+            AlignmentChangedCommand = new DelegateCommand<object>(AlignmentChanged);
+            FormContentTextChangedCommand = new DelegateCommand<string>(FormContentTextChanged);
+
+            IsMultiLineCheckedCommand = new DelegateCommand<object>(IsMultiLineChecked);
+            IsScrollToDisplayCheckedCommand = new DelegateCommand<object>(IsScrollToDisplayChecked);
             ChangeValueHandler -= ChangeValue;
             ChangeValueHandler += ChangeValue;
         }
 
+        private void IsScrollToDisplayChecked(object obj)
+        {
+           if(obj != null)
+            {
+                IsScrollText = (bool)obj;
+            }
+        }
+
+        private void IsMultiLineChecked(object obj)
+        {
+            if (obj != null)
+            {
+                IsMultiLine = (bool)obj;
+            }
+        }
+
+        private void FormContentTextChanged(string obj)
+        {
+            if(obj != null)
+            {
+                FormContent = obj;
+            }
+        }
+
+        private void AlignmentChanged(object obj)
+        {
+            if (obj != null)
+            {
+                var combo = (ComboBoxItem)obj;
+                if (combo != null)
+                {
+                    switch (combo.Content)
+                    {
+                        case "Left":
+                            TextAlignmentItem = C_TEXT_ALIGNMENT.ALIGNMENT_LEFT;
+                            break;
+
+                        case "Center":
+                            TextAlignmentItem = C_TEXT_ALIGNMENT.ALIGNMENT_CENTER;
+                            break;
+
+                        case "Right":
+                            TextAlignmentItem = C_TEXT_ALIGNMENT.ALIGNMENT_RIGHT;
+                            break;
+
+                    }
+                }
+            }
+        }
+
+        private void FontStyleChanged(object obj)
+        {
+           if(obj != null)
+            {
+                var combo = (ComboBoxItem)obj;
+                if(combo != null)
+                {
+                    switch(combo.Content)
+                    {
+                        case "Regular":
+                            FontStyleItem = FontStyles.Normal;
+                            FontWeightItem = FontWeights.Normal;
+                            break;
+
+                        case "Bold":
+                            FontStyleItem = FontStyles.Normal;
+                            FontWeightItem = FontWeights.Bold;
+                            break;
+
+                        case "Italic":
+                            FontStyleItem = FontStyles.Italic;
+                            FontWeightItem = FontWeights.Normal;
+                            break;
+
+                        case "Bold Italic":
+                            FontStyleItem = FontStyles.Italic;
+                            FontWeightItem = FontWeights.Bold;
+                            break;
+                    }
+                }
+            }
+        }
+
+        private void FontFamilyChanged(object obj)
+        {
+           if(obj!= null)
+            {
+                switch((int)obj)
+                {
+                    case 0:
+                        FontFamilyItem = new FontFamily("Courier");
+                        break;
+                    case 1:
+                        FontFamilyItem = new FontFamily("Helvetica");
+                        break;
+                    case 2:
+                        FontFamilyItem = new FontFamily("Times Roman");
+                        break;
+                }
+            }
+        }
+
+        private void ResetColorCheckedBtn(object obj)
+        {
+           if(obj != null)
+            {
+                var str = obj as string;
+                if(str != null)
+                {
+                    switch(str)
+                    {
+                        case "One":
+                            BorderColor = ResetColorOne.BorderColor.Color;
+                            ContentColor = ResetColorOne.FontColor.Color;
+                            
+                            break;
+
+                        case "Two":
+                            BorderColor = ResetColorTwo.BorderColor.Color;
+                            ContentColor = ResetColorTwo.FontColor.Color;
+                            break;
+
+                        case "Three":
+                            BorderColor = ResetColorThree.BorderColor.Color;
+                            ContentColor = ResetColorThree.FontColor.Color;
+                            break;
+
+                        case "Forth":
+                            BorderColor = ResetColorForth.BorderColor.Color;
+                            ContentColor = ResetColorForth.FontColor.Color;
+                            break;
+                    }
+                }
+            }
+        }
+
+        private void ResetColorEvent(object obj)
+        {
+            //if(obj != null && (ResetColor)obj != null)
+            // {
+            //     var resetcolor = obj as ResetColor;
+
+            // }
+
+            bool result = true;
+            DialogParameters value = new DialogParameters();
+            value.Add(ParameterNames.PDFViewer, PDFViewer);
+            dialogs.ShowDialog(DialogNames.EditPresetColorsDialog, value, e =>
+            {
+                if (e.Result != ButtonResult.OK)
+                {
+                    result = false;
+                }
+                EditPresetColorsDialogViewModel DialogVM = e.Parameters.GetValue<EditPresetColorsDialogViewModel>(ParameterNames.DataModel);
+                if (DialogVM != null)
+                {
+                   // CreateSignature(DialogVM);
+                }
+            });
+            if (!result)
+            {
+                return;
+            }
+        }
+
+        private void ThicknessChanged(object obj)
+        {
+            if(obj != null)
+            {
+                BorderThiness = (double)obj;
+            }
+        }
+
 
         #endregion
 
@@ -104,9 +398,10 @@ namespace PDF_Office.ViewModels.Form
         #region 一般处理
         private void NameTextChanged(string obj)
         {
-            if(string.IsNullOrEmpty(obj) == false)
+            if(string.IsNullOrEmpty(obj) == false && IsCurrentWidget == true)
             {
                 NameStr = obj;
+
             }
         }
 
@@ -152,6 +447,8 @@ namespace PDF_Office.ViewModels.Form
 
         public void OnNavigatedFrom(NavigationContext navigationContext)
         {
+            isCreateWidget = false;
+            IsCurrentWidget = false;
             textBoxArgs = null;
         }
 
@@ -163,13 +460,14 @@ namespace PDF_Office.ViewModels.Form
            
             GetWidgeText();
         }
-
+        bool isCreateWidget = false;
         private void GetWidgeText()
         {
-            PDFViewer.SetMouseMode(MouseModes.FormEditTool);
 
+            //新建的form表单
             if (textBoxArgs == null)
             {
+                PDFViewer.SetMouseMode(MouseModes.FormEditTool);
                 WidgetTextBoxArgs textArgs = new WidgetTextBoxArgs();
                 textArgs.BgColor = Colors.Transparent;
                 textArgs.FontSize = 12;
@@ -178,13 +476,16 @@ namespace PDF_Office.ViewModels.Form
                 textArgs.FieldName = "TextBox";
                 textBoxArgs = textArgs;
                 PDFViewer.SetToolParam(textBoxArgs);
+                isCreateWidget = true;
             }
             else
             {
                 PDFViewer.SetToolParam(new AnnotHandlerEventArgs());
+                isCreateWidget = false;
             }
 
             GetProperty();
+            IsCurrentWidget = true;
         }
         private void GetProperty()
         {
@@ -193,13 +494,17 @@ namespace PDF_Office.ViewModels.Form
                 NameStr = textBoxArgs.FieldName;
                 IsRequiredField = textBoxArgs.IsRequired;
                 IsMultiLine = textBoxArgs.IsMultiLine;
-                
+                IsLocked = textBoxArgs.Locked;
+                ToolTipStr = textBoxArgs.Tooltip;
+
+
             }
         }
 
         //更改基类公共属性后,触发的事件
         private void ChangeValue(object sender, FormAttributeType e)
         {
+
            switch(e)
             {
                 case FormAttributeType.Name:
@@ -224,7 +529,7 @@ namespace PDF_Office.ViewModels.Form
 
                 case FormAttributeType.HeightSize:
                     textBoxArgs.DefaultWidth = HeightSize;
-                    //AttribEvent?.UpdateAttrib(, BorderThiness);
+                 //   AttribEvent?.UpdateAttrib(AnnotAttrib.h, HeightSize);
                     break;
 
                 case FormAttributeType.BorderThiness:
@@ -233,7 +538,7 @@ namespace PDF_Office.ViewModels.Form
                     break;
 
                 case FormAttributeType.BorderColor:
-                    textBoxArgs.LineColor = BorderColor;
+                    textBoxArgs.BgColor = BorderColor;
                     AttribEvent?.UpdateAttrib(AnnotAttrib.Color, BorderColor);
                     break;
 
@@ -248,6 +553,8 @@ namespace PDF_Office.ViewModels.Form
                     break;
 
                 case FormAttributeType.WidthSize:
+                    textBoxArgs.DefaultWidth = WidthSize;
+                    
                     break;
 
                 case FormAttributeType.IsRequiredField:
@@ -265,8 +572,37 @@ namespace PDF_Office.ViewModels.Form
             switch(tag)
             {
                 case "FormPos":
+                    textBoxArgs.FormField = FormField.Visible;
                     AttribEvent?.UpdateAttrib(AnnotAttrib.FormField,FormPos);
                     break;
+                case "FontFamilyItem":
+                    textBoxArgs.FontFamily = FontFamilyItem.Source;
+                    AttribEvent?.UpdateAttrib(AnnotAttrib.FontFamily, FontFamilyItem.Source);
+                    break;
+                case "FontStyleItem":
+                    textBoxArgs.FontStyle = FontStyleItem;
+                    AttribEvent?.UpdateAttrib(AnnotAttrib.FontStyle, FontStyleItem);
+                    break;
+                case "FontWeightItem":
+                    textBoxArgs.FontWeight = FontWeightItem;
+                    AttribEvent?.UpdateAttrib(AnnotAttrib.FontWeight, FontWeightItem);
+                    break;
+                case "TextAlignmentItem":
+                    textBoxArgs.Alignment = TextAlignmentItem;
+                    AttribEvent?.UpdateAttrib(AnnotAttrib.TextAlign, TextAlignmentItem);
+                    break;
+                case "FormContent":
+                    textBoxArgs.Content = FormContent;
+                    AttribEvent?.UpdateAttrib(AnnotAttrib.Text, FormContent);
+                    break;
+                case "IsScrollText":
+                    textBoxArgs.ScrollFlag = IsScrollText;
+                    AttribEvent?.UpdateAttrib(AnnotAttrib.ScrollFlag, IsScrollText);
+                    break;
+                case "IsMultiLine":
+                    textBoxArgs.IsMultiLine = IsMultiLine;
+                    AttribEvent?.UpdateAttrib(AnnotAttrib.IsMutilLine, IsMultiLine);
+                    break;
             }
             AttribEvent?.UpdateAnnot();
         }

+ 12 - 0
PDF Office/Views/Dialog/Redaction/MarkSettingDialog.xaml

@@ -0,0 +1,12 @@
+<UserControl x:Class="PDF_Office.Views.Dialog.Redaction.MarkSettingDialog"
+             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:PDF_Office.Views.Dialog.Redaction"
+             mc:Ignorable="d" 
+             d:DesignHeight="450" d:DesignWidth="800">
+    <Grid>
+            
+    </Grid>
+</UserControl>

+ 28 - 0
PDF Office/Views/Dialog/Redaction/MarkSettingDialog.xaml.cs

@@ -0,0 +1,28 @@
+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 PDF_Office.Views.Dialog.Redaction
+{
+    /// <summary>
+    /// MarkSettingDialog.xaml 的交互逻辑
+    /// </summary>
+    public partial class MarkSettingDialog : UserControl
+    {
+        public MarkSettingDialog()
+        {
+            InitializeComponent();
+        }
+    }
+}

+ 61 - 0
PDF Office/Views/Dialog/Redaction/PageMarkDialog.xaml

@@ -0,0 +1,61 @@
+<UserControl
+    x:Class="PDF_Office.Views.Dialog.Redaction.PageMarkDialog"
+    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+    xmlns:cus="clr-namespace:PDF_Office.CustomControl"
+    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+    xmlns:local="clr-namespace:PDF_Office.Views.Dialog.Redaction"
+    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+    xmlns:prism="http://prismlibrary.com/"
+    Width="432"
+    Height="296"
+    d:DesignHeight="450"
+    d:DesignWidth="800"
+    prism:Dialog.WindowStyle="{StaticResource DialogWindowStyle}"
+    prism:ViewModelLocator.AutoWireViewModel="True"
+    Background="{StaticResource color.sys.layout.anti}"
+    mc:Ignorable="d">
+    <cus:DialogContent Header="Mark Page Range">
+        <StackPanel Margin="16,0">
+            <RadioButton Height="22" IsChecked="True" VerticalContentAlignment="Center" Content="Mark current page" />
+            <RadioButton Height="22" VerticalContentAlignment="Center" Margin="0,8" Content="Mark all page" />
+            <RadioButton Height="22" VerticalContentAlignment="Center" Content="Mark odd page" />
+            <RadioButton Height="22" VerticalContentAlignment="Center" Margin="0,8" Content="Mark even page" />
+            <RadioButton Name="RbtnCustomPage" Height="22" VerticalContentAlignment="Center" Content="Mark specific page range" />
+            <StackPanel
+                Margin="0,8"
+                HorizontalAlignment="Left"
+                VerticalAlignment="Center"
+                Orientation="Horizontal">
+                <cus:TextBoxEx
+                    Width="228"
+                    Height="32"
+                    CornerRadius="4"
+                    IsEnabled="{Binding ElementName=RbtnCustomPage, Path=IsChecked}"
+                    PlaceholderText="e.g. 1,3-5,10" />
+                <TextBlock
+                    Margin="8,0,0,0"
+                    VerticalAlignment="Center"
+                    Text="/" />
+            </StackPanel>
+        </StackPanel>
+        <cus:DialogContent.BottmBar>
+            <StackPanel
+                Margin="16,0"
+                HorizontalAlignment="Right"
+                Orientation="Horizontal">
+                <Button
+                    Width="80"
+                    Height="32"
+                    Content="Apply"
+                    Style="{StaticResource Btn.cta}" />
+                <Button
+                    Width="80"
+                    Height="32"
+                    Margin="16,0,0,0"
+                    Content="Cancel"
+                    Style="{StaticResource btn.sec}" />
+            </StackPanel>
+        </cus:DialogContent.BottmBar>
+    </cus:DialogContent>
+</UserControl>

+ 28 - 0
PDF Office/Views/Dialog/Redaction/PageMarkDialog.xaml.cs

@@ -0,0 +1,28 @@
+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 PDF_Office.Views.Dialog.Redaction
+{
+    /// <summary>
+    /// PageMarkDialog.xaml 的交互逻辑
+    /// </summary>
+    public partial class PageMarkDialog : UserControl
+    {
+        public PageMarkDialog()
+        {
+            InitializeComponent();
+        }
+    }
+}

+ 80 - 0
PDF Office/Views/Dialog/Redaction/RepeatMarkDialog.xaml

@@ -0,0 +1,80 @@
+<UserControl
+    x:Class="PDF_Office.Views.Dialog.Redaction.RepeatMarkDialog"
+    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+    xmlns:cus="clr-namespace:PDF_Office.CustomControl"
+    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+    xmlns:prism="http://prismlibrary.com/"
+    Width="432"
+    Height="236"
+    d:DesignHeight="450"
+    d:DesignWidth="800"
+    prism:Dialog.WindowStyle="{StaticResource DialogWindowStyle}"
+    prism:ViewModelLocator.AutoWireViewModel="True"
+    Background="{StaticResource color.sys.layout.anti}"
+    mc:Ignorable="d">
+    <cus:DialogContent Header="Reapet Mark Across Pages">
+        <StackPanel Margin="16,0">
+            <RadioButton
+                Height="22"
+                VerticalContentAlignment="Center"
+                Content="All Pages"
+                GroupName="Page"
+                IsChecked="True" />
+            <RadioButton
+                Height="22"
+                Margin="0,8"
+                VerticalContentAlignment="Center"
+                Content="Odd Pages"
+                GroupName="Page" />
+            <RadioButton
+                Height="22"
+                VerticalContentAlignment="Center"
+                Content="Even Pages"
+                GroupName="Page" />
+
+            <StackPanel
+                Margin="0,8"
+                HorizontalAlignment="Left"
+                VerticalAlignment="Center"
+                Orientation="Horizontal">
+                <RadioButton
+                    Name="RbtnCustomPage"
+                    Height="22"
+                    VerticalContentAlignment="Center"
+                    Content="Custom"
+                    GroupName="Page" />
+                <cus:TextBoxEx
+                    Width="228"
+                    Height="32"
+                    Margin="8,0,0,0"
+                    CornerRadius="4"
+                    IsEnabled="{Binding ElementName=RbtnCustomPage, Path=IsChecked}"
+                    PlaceholderText="e.g. 1,3-5,10" />
+                <TextBlock
+                    Margin="8,0,0,0"
+                    VerticalAlignment="Center"
+                    Text="/" />
+            </StackPanel>
+        </StackPanel>
+        <cus:DialogContent.BottmBar>
+            <StackPanel
+                Margin="16,0"
+                HorizontalAlignment="Right"
+                Orientation="Horizontal">
+                <Button
+                    Width="80"
+                    Height="32"
+                    Content="Apply"
+                    Style="{StaticResource Btn.cta}" />
+                <Button
+                    Width="80"
+                    Height="32"
+                    Margin="16,0,0,0"
+                    Content="Cancel"
+                    Style="{StaticResource btn.sec}" />
+            </StackPanel>
+        </cus:DialogContent.BottmBar>
+    </cus:DialogContent>
+</UserControl>

+ 28 - 0
PDF Office/Views/Dialog/Redaction/RepeatMarkDialog.xaml.cs

@@ -0,0 +1,28 @@
+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 PDF_Office.Views.Dialog.Redaction
+{
+    /// <summary>
+    /// RepeatMarkDialog.xaml 的交互逻辑
+    /// </summary>
+    public partial class RepeatMarkDialog : UserControl
+    {
+        public RepeatMarkDialog()
+        {
+            InitializeComponent();
+        }
+    }
+}

+ 101 - 0
PDF Office/Views/Form/EditPresetColorsDialog.xaml

@@ -0,0 +1,101 @@
+<UserControl x:Class="PDF_Office.Views.Form.EditPresetColorsDialog"
+             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:PDF_Office.Views.Form"
+             xmlns:cus="clr-namespace:PDF_Office.CustomControl"
+             xmlns:cusColor="clr-namespace:PDF_Office.CustomControl.CompositeControl"
+             xmlns:prism="http://prismlibrary.com/"             
+             prism:ViewModelLocator.AutoWireViewModel="True"
+             mc:Ignorable="d" 
+             d:DesignHeight="450" d:DesignWidth="800">
+    <cus:DialogContent Header="Edit Preset Colors" Width="468" Height="258">
+        <cus:DialogContent.Content>
+            <Grid>
+                <Grid.ColumnDefinitions>
+                    <ColumnDefinition Width="Auto"/>
+                    <ColumnDefinition/>
+                </Grid.ColumnDefinitions>
+
+                <Border Width="162" Height="144" BorderThickness="1" CornerRadius="8" Background="#F7F8FA">
+                    <Grid Width="78" Height="18">
+                        <Rectangle x:Name="rect" Fill="{Binding FillColor}" Stroke="{Binding BorderColor}" StrokeThickness="1" VerticalAlignment="Stretch"/>
+                        <TextBlock x:Name="text" Text="Text" FontSize="14" LineHeight="22" FontFamily="Segoe UI" Foreground="{Binding FontColor,Mode=OneWay}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
+                    </Grid>
+                </Border>
+
+                <Grid Grid.Column="1" Height="144">
+                    <Grid.RowDefinitions>
+                        <RowDefinition  Height="*"/>
+                        <RowDefinition  Height="*"/>
+                        <RowDefinition  Height="*"/>
+                        <RowDefinition  Height="*"/>
+                    </Grid.RowDefinitions>
+
+                    <Grid.ColumnDefinitions>
+                        <ColumnDefinition />
+                        <ColumnDefinition Width="auto"/>
+                    </Grid.ColumnDefinitions>
+
+                    <TextBlock Text="Settings" Grid.ColumnSpan="2" VerticalAlignment="Center"/>
+                    <TextBlock Text="Border Color:" Grid.Row="1" VerticalAlignment="Center"/>
+                    <StackPanel Orientation="Horizontal" Grid.Row="1" Grid.Column="1">
+                        <cusColor:ColorSubContent x:Name="BorderColorBox" Grid.Column="1" Grid.Row="2" HorizontalAlignment="Left"
+                                   ></cusColor:ColorSubContent>
+                    </StackPanel>
+
+                    <TextBlock Text="Background Color:" Grid.Row="2" VerticalAlignment="Center"/>
+                    <StackPanel Orientation="Horizontal" Grid.Row="2" Grid.Column="1">
+                        <cusColor:ColorSubContent x:Name="BgColorBox" Grid.Column="1" Grid.Row="2" HorizontalAlignment="Left"
+                                   ></cusColor:ColorSubContent>
+                    </StackPanel>
+                    
+                    <TextBlock Text="Text Color:" Grid.Row="3" VerticalAlignment="Center"/>
+                    <StackPanel Orientation="Horizontal" Grid.Row="3" Grid.Column="1">
+                        <cusColor:ColorSubContent x:Name="TextColorBox" Grid.Column="1" Grid.Row="2" HorizontalAlignment="Left"
+                                   ></cusColor:ColorSubContent>
+
+                    </StackPanel>
+                </Grid>
+            </Grid>
+        </cus:DialogContent.Content>
+
+        <cus:DialogContent.BottmBar>
+            <Grid>
+                <Grid.ColumnDefinitions>
+                    <ColumnDefinition Width="50*" />
+                    <ColumnDefinition Width="50*" />
+                    <ColumnDefinition Width="50*" />
+                </Grid.ColumnDefinitions>
+                <Button
+                    Style="{StaticResource btn.sec}"
+                    Grid.Column="0"
+                    Width="150"
+                    Height="32"
+                    Margin="25,0,0,0"
+                    HorizontalAlignment="Right"
+                    Command="{Binding CreateCommnad}"
+                    Content="Reset Settings" />
+                <Button
+                    Style="{StaticResource Btn.cta}"
+                    Grid.Column="1"
+                    Width="150"
+                    Height="32"
+                    Margin="25,0,0,0"
+                    HorizontalAlignment="Right"
+                    Command="{Binding CreateCommnad}"
+                    Content="确定" />
+                <Button
+                    Style="{StaticResource btn.sec}"
+                    Grid.Column="2"
+                    Width="150"
+                    Height="32"
+                    Margin="0,0,25,0"
+                    HorizontalAlignment="Right"
+                    Command="{Binding CancelCommand}"
+                    Content="取消" />
+            </Grid>
+        </cus:DialogContent.BottmBar>
+    </cus:DialogContent>
+</UserControl>

+ 70 - 0
PDF Office/Views/Form/EditPresetColorsDialog.xaml.cs

@@ -0,0 +1,70 @@
+using PDF_Office.ViewModels.Form;
+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 PDF_Office.Views.Form
+{
+    /// <summary>
+    /// EditPresetColorsDialog.xaml 的交互逻辑
+    /// </summary>
+    public partial class EditPresetColorsDialog : UserControl
+    {
+        public EditPresetColorsDialogViewModel ViewModel =>DataContext as EditPresetColorsDialogViewModel;
+        public EditPresetColorsDialog()
+        {
+            InitializeComponent();
+            this.Loaded += userControl_Loaded;
+        }
+
+        private void userControl_Loaded(object sender, RoutedEventArgs e)
+        {
+            if (ViewModel != null)
+            {
+                BorderColorBox.SelectedColorHandler -= BorderColorBox_SelectedColorHandler;
+                BorderColorBox.SelectedColorHandler += BorderColorBox_SelectedColorHandler;
+
+                BgColorBox.SelectedColorHandler -= BgColorBox_SelectedColorHandler;
+                BgColorBox.SelectedColorHandler += BgColorBox_SelectedColorHandler;
+
+                TextColorBox.SelectedColorHandler -= TextColorBox_SelectedColorHandler;
+                TextColorBox.SelectedColorHandler += TextColorBox_SelectedColorHandler;
+            }
+        }
+
+        private void TextColorBox_SelectedColorHandler(object sender, Color e)
+        {
+            if (ViewModel != null)
+            {
+                ViewModel.FontColor = new SolidColorBrush(e);
+            }
+        }
+
+        private void BgColorBox_SelectedColorHandler(object sender, Color e)
+        {
+            if (ViewModel != null)
+            {
+                ViewModel.FillColor = new SolidColorBrush(e);
+            }
+        }
+
+        private void BorderColorBox_SelectedColorHandler(object sender, Color e)
+        {
+            if (ViewModel != null)
+            {
+                ViewModel.BorderColor = new SolidColorBrush(e);
+            }
+        }
+    }
+}

+ 12 - 0
PDF Office/Views/Form/EmptyFormProperty.xaml

@@ -0,0 +1,12 @@
+<UserControl x:Class="PDF_Office.Views.Form.EmptyFormProperty"
+             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:PDF_Office.Views.Form"
+             mc:Ignorable="d" 
+             d:DesignHeight="450" d:DesignWidth="800">
+    <Grid Width="260" Background="Wheat">
+            
+    </Grid>
+</UserControl>

+ 28 - 0
PDF Office/Views/Form/EmptyFormProperty.xaml.cs

@@ -0,0 +1,28 @@
+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 PDF_Office.Views.Form
+{
+    /// <summary>
+    /// EmptyFormProperty.xaml 的交互逻辑
+    /// </summary>
+    public partial class EmptyFormProperty : UserControl
+    {
+        public EmptyFormProperty()
+        {
+            InitializeComponent();
+        }
+    }
+}

+ 318 - 32
PDF Office/Views/Form/TextFieldProperty.xaml

@@ -10,6 +10,7 @@
     xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
     xmlns:prism="http://prismlibrary.com/"
     prism:ViewModelLocator.AutoWireViewModel="True"
+    xmlns:CompositeControl="clr-namespace:PDF_Office.CustomControl.CompositeControl"
     xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
     d:DesignHeight="750"
     d:DesignWidth="260"
@@ -17,6 +18,11 @@
     mc:Ignorable="d">
     <UserControl.Resources>
         <ResourceDictionary>
+            <ResourceDictionary.MergedDictionaries>
+                <ResourceDictionary Source="../../Styles/ListViewStyle.xaml" />
+                <ResourceDictionary Source="../../Styles/SliderStyle.xaml"/>
+            </ResourceDictionary.MergedDictionaries>
+           
             <convert:InvertBoolConvert x:Key="InvertBoolConvert" />
             <Style TargetType="{x:Type TabItem}">
                 <Setter Property="Width" Value="74.67 " />
@@ -29,6 +35,27 @@
                 <Setter Property="Height" Value="16" />
                 <Setter Property="Fill" Value="{StaticResource color.icon.base.neutral.norm.lv1}" />
             </Style>
+
+            <DataTemplate x:Key="ContentColorTemplate">
+                <Grid Width="84" Height="24">
+                    <Rectangle Stroke="Red" StrokeThickness="1"/>
+                    <TextBlock Text="Text"/>
+                </Grid>
+            </DataTemplate>
+            <ContextMenu x:Key="ColorBtnFlyoutMenu" FontSize="14">
+                <ContextMenu.ItemContainerStyle>
+                    <Style TargetType="MenuItem">
+                        <Setter Property="Padding" Value="0,7,0,7" />
+                        <Setter Property="VerticalContentAlignment" Value="Center" />
+                    </Style>
+                </ContextMenu.ItemContainerStyle>
+                <MenuItem
+                    Name="EditMenuItem"
+                    Click="EditMenuItem_Click"
+                    Header="Edit"
+                    IsEnabled="True" />
+              
+            </ContextMenu>
         </ResourceDictionary>
     </UserControl.Resources>
     <Grid ScrollViewer.VerticalScrollBarVisibility="Auto">
@@ -82,7 +109,7 @@
                         Margin="0,18,0,10"
                         Style="{StaticResource PropertyHeaderLv2}"
                         Text="Form Field" />
-                    <form:FormFieldCombox x:Name="formCombox" Type="{Binding FormPos,Mode=TwoWay}" Height="32" Margin="0,8,0,16" />
+                    <form:FormFieldCombox x:Name="formCombox" Type="{Binding FormPos,Mode=OneWay}" Height="32" Margin="0,8,0,16" />
                     <CheckBox x:Name="ReadOnlyCheckBox" Content="Read Only" Command="{Binding IsReadOnlyCheckedCommand}" CommandParameter="{Binding ElementName=ReadOnlyCheckBox,Path=IsChecked}"/>
                     <CheckBox x:Name="RequiredFieldCheckBox" Margin="0,8" Content="Required field"  Command="{Binding RequiredFieldCheckedCommand}" CommandParameter="{Binding ElementName=RequiredFieldCheckBox,Path=IsChecked}"/>
                 </StackPanel>
@@ -93,23 +120,239 @@
                 </TabItem.Header>
                 <Grid IsEnabled="{Binding ElementName=ChkLock, Path=IsChecked, Converter={StaticResource InvertBoolConvert}}" >
                     <StackPanel>
-                        <TextBlock
+                        <StackPanel>
+                            <TextBlock
                         Margin="0,18,0,10"
                         Style="{StaticResource PropertyHeaderLv2}"
                         Text="Set Color" />
-                        <TextBlock
+
+                            <Grid Height="50" >
+                                <Grid.RowDefinitions>
+                                    <RowDefinition Height="auto"/>
+                                    <RowDefinition  Height="auto"/>
+                                </Grid.RowDefinitions>
+                                <Grid.ColumnDefinitions>
+                                    <ColumnDefinition Width="*"/>
+                                    <ColumnDefinition Width="*"/>
+                                </Grid.ColumnDefinitions>
+
+                                <RadioButton x:Name="OneBtn" BorderThickness="1" Width="84" Height="24" Grid.Row="0" Grid.Column="0" Tag="One"
+                                          Style="{StaticResource BlueBorderRadionButtonWithCorner}" Padding="3"
+                                              ContextMenu="{StaticResource ColorBtnFlyoutMenu}"
+                                              >
+                                    <Grid Width="78" Height="18">
+                                        <Rectangle Fill="{Binding ResetColorOne.FillColor}" Stroke="{Binding ResetColorOne.BorderColor}" StrokeThickness="1" VerticalAlignment="Stretch"/>
+                                        <TextBlock Text="Text" FontSize="14" LineHeight="22" FontFamily="Segoe UI" Foreground="{Binding ResetColorOne.FontColor}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
+                                    </Grid>
+                                    <i:Interaction.Triggers>
+                                        <i:EventTrigger EventName="Checked">
+                                            <i:InvokeCommandAction Command="{Binding ResetColorCheckedBtnCommand}" CommandParameter="{Binding ElementName=OneBtn,Path=Tag}"/>
+                                        </i:EventTrigger>
+                                    </i:Interaction.Triggers>
+                                </RadioButton>
+
+                                <RadioButton x:Name="TwoBtn" BorderThickness="1" Width="84" Height="24" Grid.Row="0" Grid.Column="1" Tag="Two"
+                                          Style="{StaticResource BlueBorderRadionButtonWithCorner}"
+                                          ContextMenu="{StaticResource ColorBtnFlyoutMenu}"  
+                                             >
+                                    <Grid Width="78" Height="18">
+                                        <Rectangle Fill="{Binding ResetColorTwo.FillColor}" Stroke="{Binding ResetColorTwo.BorderColor}" StrokeThickness="1" VerticalAlignment="Stretch"/>
+                                        <TextBlock Text="Text" FontSize="14" LineHeight="22" FontFamily="Segoe UI" Foreground="{Binding ResetColorTwo.FontColor}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
+                                    </Grid>
+                                    <i:Interaction.Triggers>
+                                        <i:EventTrigger EventName="Checked">
+                                            <i:InvokeCommandAction Command="{Binding ResetColorCheckedBtnCommand}" CommandParameter="{Binding ElementName=TwoBtn,Path=Tag}"/>
+                                        </i:EventTrigger>
+                                    </i:Interaction.Triggers>
+                                </RadioButton>
+
+                                <RadioButton x:Name="ThreeBtn" BorderThickness="1" Width="84" Height="24" Grid.Row="1" Grid.Column="0" Tag="Three"
+                                          Style="{StaticResource BlueBorderRadionButtonWithCorner}"
+                                           ContextMenu="{StaticResource ColorBtnFlyoutMenu}"    
+                                              >
+                                    <Grid Width="78" Height="18">
+                                        <Rectangle Fill="{Binding ResetColorThree.FillColor}" Stroke="{Binding ResetColorThree.BorderColor}" StrokeThickness="1" VerticalAlignment="Stretch"/>
+                                        <TextBlock Text="Text" FontSize="14" LineHeight="22" FontFamily="Segoe UI" Foreground="{Binding ResetColorThree.FontColor}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
+                                    </Grid>
+                                    <i:Interaction.Triggers>
+                                        <i:EventTrigger EventName="Checked">
+                                            <i:InvokeCommandAction Command="{Binding ResetColorCheckedBtnCommand}" CommandParameter="{Binding ElementName=ThreeBtn,Path=Tag}"/>
+                                        </i:EventTrigger>
+                                    </i:Interaction.Triggers>
+                                </RadioButton>
+
+                                <RadioButton x:Name="ForthBtn" BorderThickness="1" Width="84" Height="24" Grid.Row="1" Grid.Column="1" Tag="Forth"
+                                          Style="{StaticResource BlueBorderRadionButtonWithCorner}"
+                                           ContextMenu="{StaticResource ColorBtnFlyoutMenu}"    
+                                              >
+                                    <Grid Width="78" Height="18">
+                                        <Rectangle Fill="{Binding ResetColorForth.FillColor}" Stroke="{Binding ResetColorForth.BorderColor}" StrokeThickness="1" VerticalAlignment="Stretch"/>
+                                        <TextBlock Text="Text" FontSize="14" LineHeight="22" FontFamily="Segoe UI" Foreground="{Binding ResetColorForth.FontColor}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
+                                    </Grid>
+                                    <i:Interaction.Triggers>
+                                        <i:EventTrigger EventName="Checked">
+                                            <i:InvokeCommandAction Command="{Binding ResetColorCheckedBtnCommand}" CommandParameter="{Binding ElementName=ForthBtn,Path=Tag}"/>
+                                        </i:EventTrigger>
+                                    </i:Interaction.Triggers>
+                                </RadioButton>
+                                
+                            </Grid>
+                           
+
+                        </StackPanel>
+
+                        <StackPanel>
+                            <TextBlock
                         Margin="0,18,0,10"
                         Style="{StaticResource PropertyHeaderLv2}"
                         Text="Line" />
-                        <TextBlock
+
+
+                            <CompositeControl:SlidComboControl x:Name="thickness">
+                                <i:Interaction.Triggers>
+                                    <i:EventTrigger EventName="ValueChanged">
+                                        <i:InvokeCommandAction Command="{Binding ThicknessChangedCommand}" CommandParameter="{Binding ElementName=thickness,Path=Value}"/>
+                                    </i:EventTrigger>
+                                </i:Interaction.Triggers>
+                            </CompositeControl:SlidComboControl>
+                        </StackPanel>
+                        
+                        
+                        
+                        <StackPanel>
+                            <TextBlock
                         Margin="0,18,0,10"
                         Style="{StaticResource PropertyHeaderLv2}"
                         Text="文本" />
 
-                        <TextBlock
+                            <Grid Margin="0,6,0,0">
+                                <Grid.ColumnDefinitions>
+                                    <ColumnDefinition Width="auto"></ColumnDefinition>
+                                    <ColumnDefinition Width="auto"></ColumnDefinition>
+                                </Grid.ColumnDefinitions>
+                                <Grid.RowDefinitions>
+                                    <RowDefinition Height="auto"></RowDefinition>
+                                    <RowDefinition Height="auto"></RowDefinition>
+                                    <RowDefinition Height="auto"></RowDefinition>
+                                </Grid.RowDefinitions>
+
+                                <Border BorderBrush="#E2E3E6" Grid.ColumnSpan="2"  Width="228" Height="32" Margin="12,0,4,0"  BorderThickness="0">
+                                    <Grid>
+                                        <ComboBox IsReadOnly="True" Name="FontFamilyBox" Background="Transparent" Padding="10 10 0 0"  BorderThickness="1" BorderBrush="#FFE2E3E6">
+                                            <ComboBox.ItemContainerStyle>
+                                                <Style TargetType="{x:Type ComboBoxItem}">
+                                                    <Setter Property="Padding" Value="10 0 0 0"/>
+                                                </Style>
+                                            </ComboBox.ItemContainerStyle>
+                                            <ComboBoxItem Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}">
+                                                <TextBlock Text="Courier New" FontFamily="Courier New" Tag="Courier"  FontSize="14"/>
+                                            </ComboBoxItem>
+                                            <ComboBoxItem Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}">
+                                                <TextBlock Text="Arial" FontFamily="Arial" Tag="Helvetica" FontSize="14"/>
+                                            </ComboBoxItem>
+                                            <ComboBoxItem Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}">
+                                                <TextBlock Text="Times New Roman" FontFamily="Times New Roman" Tag="Times Roman" FontSize="14"/>
+                                            </ComboBoxItem>
+                                            <i:Interaction.Triggers>
+                                                <i:EventTrigger EventName="SelectionChanged">
+                                                    <i:InvokeCommandAction Command="{Binding FontFamilyChangedCommand}" CommandParameter="{Binding ElementName=FontFamilyBox,Path=SelectedIndex}"/>
+                                                </i:EventTrigger>
+                                            </i:Interaction.Triggers>
+                                        </ComboBox>
+
+                                        <TextBox Name="FontFamilyText" FontFamily="Segoe UI" FontSize="14" Background="White"  Padding="10 0 0 0" Margin="2,0,25,0" IsReadOnly="True"
+                             BorderThickness="0" VerticalAlignment="Center" TextAlignment="Left">
+                                        </TextBox>
+                                    </Grid>
+                                </Border>
+
+  
+                                <Border Grid.Row="1" BorderBrush="#E2E3E6"  Width="148" Height="32" Margin="12,8,4,0"  BorderThickness="0">
+                                    <Grid>
+                                        <ComboBox Name="FontStyleBox" IsReadOnly="True" BorderThickness="1" BorderBrush="#FFE2E3E6" Padding="10 10 0 0" Background="Transparent">
+                                            <ComboBox.ItemContainerStyle>
+                                                <Style TargetType="{x:Type ComboBoxItem}">
+                                                    <Setter Property="Padding" Value="10 0 0 0"/>
+                                                </Style>
+                                            </ComboBox.ItemContainerStyle>
+                                            <ComboBoxItem x:Name="RegularItem" Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}">Regular</ComboBoxItem>
+                                            <ComboBoxItem x:Name="BoldItem" Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}">Bold</ComboBoxItem>
+                                            <ComboBoxItem x:Name="ItalicItem" Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}">Italic</ComboBoxItem>
+                                            <ComboBoxItem x:Name="BoldItalicItem" Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}">Bold Italic</ComboBoxItem>
+
+                                            <i:Interaction.Triggers>
+                                                <i:EventTrigger EventName="SelectionChanged">
+                                                    <i:InvokeCommandAction Command="{Binding FontStyleChangedCommand}" CommandParameter="{Binding ElementName=FontStyleBox,Path=SelectedItem}"/>
+                                                </i:EventTrigger>
+                                            </i:Interaction.Triggers>
+                                        </ComboBox>
+                                        <TextBox Name="FontStyleText" IsReadOnly="True" FontFamily="Segoe UI" FontSize="14" Background="White" Padding="10 0 0 0" Height="20" Margin="2,0,35,0" 
+                             BorderThickness="0" VerticalAlignment="Center" TextAlignment="Left">
+                                        </TextBox>
+                                    </Grid>
+                                </Border>
+
+                                <Border Grid.Row="1" Grid.Column="1" BorderBrush="#E2E3E6"  Width="80" Height="32" Margin="-1,8,0,0"  BorderThickness="0">
+                                    <Grid>
+                                        <ComboBox Name="FontSizeBox" BorderThickness="1" Background="Transparent" BorderBrush="#FFE2E3E6"
+                                  MaxDropDownHeight="200">
+                                            <ComboBox.ItemContainerStyle>
+                                                <Style TargetType="{x:Type ComboBoxItem}">
+                                                    <Setter Property="Padding" Value="10 0 0 0"/>
+                                                </Style>
+                                            </ComboBox.ItemContainerStyle>
+                                            <ComboBoxItem Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}">6</ComboBoxItem>
+                                            <ComboBoxItem Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}">8</ComboBoxItem>
+                                            <ComboBoxItem Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}">9</ComboBoxItem>
+                                            <ComboBoxItem Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}">10</ComboBoxItem>
+                                            <ComboBoxItem Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}">12</ComboBoxItem>
+                                            <ComboBoxItem Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}">14</ComboBoxItem>
+                                            <ComboBoxItem Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}">18</ComboBoxItem>
+                                            <ComboBoxItem Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}">20</ComboBoxItem>
+                                            <ComboBoxItem Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}">22</ComboBoxItem>
+                                            <ComboBoxItem Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}">24</ComboBoxItem>
+                                            <ComboBoxItem Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}">26</ComboBoxItem>
+                                            <ComboBoxItem Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}">28</ComboBoxItem>
+                                            <ComboBoxItem Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}">32</ComboBoxItem>
+                                            <ComboBoxItem Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}">36</ComboBoxItem>
+                                            <ComboBoxItem Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}">48</ComboBoxItem>
+                                            <ComboBoxItem Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}">72</ComboBoxItem>
+                                            <i:Interaction.Triggers>
+                                                <i:EventTrigger EventName="SelectionChanged">
+                                                    <i:InvokeCommandAction Command="{Binding FontSizeChangedCommand}" CommandParameter="{Binding ElementName=FontSizeBox,Path=SelectedItem}"/>
+                                                </i:EventTrigger>
+                                            </i:Interaction.Triggers>
+                                        </ComboBox>
+                                        <TextBox Name="FontSizeText" FontFamily="Segoe UI" FontSize="14" Background="White" Height="20" Padding="10 0 0 0" Margin="2,0,35,0" 
+                             BorderThickness="0" VerticalAlignment="Center" TextAlignment="Left" IsReadOnly="True">
+                                        </TextBox>
+                                    </Grid>
+                                </Border>
+
+                            </Grid>
+
+                        </StackPanel>
+                        
+                        <StackPanel>
+
+                            <TextBlock
                         Margin="0,18,0,10"
                         Style="{StaticResource PropertyHeaderLv2}"
                         Text="大小" />
+                            <StackPanel Orientation="Horizontal">
+                                <Path Data="M12.9999 8.75012V10.8285L15.8284 8.00006L12.9999 5.17163V7.25012H2.82843V5.17175L0 8.00017L2.82843 10.8286V8.75012H12.9999Z" Fill="#616469"/>
+                                <cus:NumericUpDown Height="32" Width="90"/>
+
+                                <Path Data="M10.8284 2.82843H8.74999L8.74999 12.9999H10.8285L8.00005 15.8284L5.17163 12.9999H7.24999L7.24999 2.82843H5.17151L7.99994 0L10.8284 2.82843Z" Fill="#616469"/>
+                                <cus:NumericUpDown Height="32" Width="90"/>
+                            </StackPanel>
+                        </StackPanel>
+                     
+                        
+                        
+                     
+                       
+
                     </StackPanel>
                 </Grid>
             </TabItem>
@@ -118,57 +361,100 @@
                 <TabItem.Header>
                     <Path Data="M4.91675 3.75V5H6.41675V1H4.91675V2.25H1.66675V3.75H4.91675ZM15.6667 3.75L7.66675 3.75V2.25L15.6667 2.25V3.75ZM1.66675 7.25V8.75H8.91675V10H10.4167V6H8.91675V7.25H1.66675ZM15.6667 8.75L11.6667 8.75V7.25L15.6667 7.25V8.75ZM7.66675 12.25V13.75L15.6667 13.75V12.25L7.66675 12.25ZM4.91675 13.75H1.66675V12.25H4.91675V11H6.41675V15H4.91675V13.75Z" Fill="{StaticResource color.light.gray.11}" />
                 </TabItem.Header>
-                <StackPanel IsEnabled="{Binding ElementName=ChkLock, Path=IsChecked, Converter={StaticResource InvertBoolConvert}}">
-                    <TextBlock
+                <Grid>
+                    <StackPanel IsEnabled="{Binding ElementName=ChkLock, Path=IsChecked, Converter={StaticResource InvertBoolConvert}}">
+                        <TextBlock Text="Alignment"/>
+                        <ComboBox Name="AlignmentBox" BorderThickness="1" Background="Transparent" BorderBrush="#FFE2E3E6"
+                                  MaxDropDownHeight="200">
+                            <ComboBox.ItemContainerStyle>
+                                <Style TargetType="{x:Type ComboBoxItem}">
+                                    <Setter Property="Padding" Value="10 0 0 0"/>
+                                </Style>
+                            </ComboBox.ItemContainerStyle>
+                            <ComboBoxItem Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}">Left</ComboBoxItem>
+                            <ComboBoxItem Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}">Center</ComboBoxItem>
+                            <ComboBoxItem Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}">Right</ComboBoxItem>
+                            <i:Interaction.Triggers>
+                                <i:EventTrigger EventName="SelectionChanged">
+                                    <i:InvokeCommandAction Command="{Binding AlignmentChangedCommand}" CommandParameter="{Binding ElementName=AlignmentBox,Path=SelectedItem}"/>
+                                </i:EventTrigger>
+                            </i:Interaction.Triggers>
+                        </ComboBox>
+
+                        <TextBlock Text="Default Value"/>
+                        <cus:TextBoxEx x:Name="DefaultValueBox" Height="150" CornerRadius="4" Text="{Binding FormContent,Mode=TwoWay}" >
+                            <i:Interaction.Triggers>
+                                <i:EventTrigger EventName="TextChanged">
+                                    <i:InvokeCommandAction Command="{Binding FormContentTextChangedCommand}" CommandParameter="{Binding ElementName=DefaultValueBox,Path=Text}"/>
+                                </i:EventTrigger>
+                            </i:Interaction.Triggers>
+                        </cus:TextBoxEx>
+
+                        <CheckBox x:Name="MultiLineCheck" Content="Nulti-line"  Command="{Binding IsMultiLineCheckedCommand}" CommandParameter="{Binding ElementName=MultiLineCheck,Path=IsChecked}"/>
+                        <CheckBox x:Name="ScrollToDisplayLongCheck" Content="Scroll to display long text"  Command="{Binding IsScrollToDisplayCheckedCommand}" CommandParameter="{Binding ElementName=ScrollToDisplayLongCheck,Path=IsChecked}"/>
+                    </StackPanel>
+                    
+                    
+                    
+
+                    <StackPanel Visibility="Collapsed" IsEnabled="{Binding ElementName=ChkLock, Path=IsChecked, Converter={StaticResource InvertBoolConvert}}">
+                        <TextBlock
                         Margin="0,18,0,10"
                         Style="{StaticResource PropertyHeaderLv2}"
                         Text="Projects" />
-                    <Grid>
-                        <cus:TextBoxEx
+                        <Grid>
+                            <cus:TextBoxEx
                             Width="188"
                             Height="32"
                             HorizontalAlignment="Left"
                             CornerRadius="4" />
-                        <Button
+                            <Button
                             Width="32"
                             HorizontalAlignment="Right"
                             Style="{StaticResource btn.sec-icon}">
-                            <Path Data="M7.25 8.75V14H8.75V8.75H14V7.25H8.75V2H7.25V7.25H2V8.75H7.25Z" />
-                        </Button>
-                    </Grid>
-                    <TextBlock
+                                <Path Data="M7.25 8.75V14H8.75V8.75H14V7.25H8.75V2H7.25V7.25H2V8.75H7.25Z" />
+                            </Button>
+                        </Grid>
+                        <TextBlock
                         Margin="0,18,0,10"
                         Style="{StaticResource PropertyHeaderLv2}"
                         Text="Exported Values" />
-                    <cus:TextBoxEx Height="32" CornerRadius="4" />
-                    <ListBox Height="98" Margin="0,8" />
-                    <StackPanel Margin="0,0,0,8" Orientation="Horizontal">
-                        <Button
+                        <cus:TextBoxEx Height="32" CornerRadius="4" />
+                        <ListBox Height="98" Margin="0,8" />
+                        <StackPanel Margin="0,0,0,8" Orientation="Horizontal">
+                            <Button
                             Width="32"
                             Height="32"
                             Style="{StaticResource btn.sec-icon}">
-                            <Path Data="M6 1.75H10V0.25H6V1.75ZM1 4.25H2.25V15C2.25 15.4142 2.58579 15.75 3 15.75H13C13.4142 15.75 13.75 15.4142 13.75 15V4.25H15V2.75H1V4.25ZM3.75 14.25V4.25H12.25V14.25H3.75ZM7.25 6.5V11.5H8.75V6.5H7.25Z" />
-                        </Button>
-                        <Button
+                                <Path Data="M6 1.75H10V0.25H6V1.75ZM1 4.25H2.25V15C2.25 15.4142 2.58579 15.75 3 15.75H13C13.4142 15.75 13.75 15.4142 13.75 15V4.25H15V2.75H1V4.25ZM3.75 14.25V4.25H12.25V14.25H3.75ZM7.25 6.5V11.5H8.75V6.5H7.25Z" />
+                            </Button>
+                            <Button
                             Width="32"
                             Height="32"
                             Margin="8,0"
                             Style="{StaticResource btn.sec-icon}">
-                            <Path Data="M8.72505 12.4147L8.72505 1.02539L7.22505 1.02539L7.22505 12.4147L4.9054 10.0951L3.84474 11.1557L7.44471 14.7557C7.7376 15.0486 8.21248 15.0486 8.50537 14.7557L12.1053 11.1557L11.0447 10.0951L8.72505 12.4147Z" />
-                        </Button>
-                        <Button
+                                <Path Data="M8.72505 12.4147L8.72505 1.02539L7.22505 1.02539L7.22505 12.4147L4.9054 10.0951L3.84474 11.1557L7.44471 14.7557C7.7376 15.0486 8.21248 15.0486 8.50537 14.7557L12.1053 11.1557L11.0447 10.0951L8.72505 12.4147Z" />
+                            </Button>
+                            <Button
                             Width="32"
                             Height="32"
                             Style="{StaticResource btn.sec-icon}">
-                            <Path Data="M8.77509 3.58605L11.0947 5.9057L12.1554 4.84504L8.55542 1.24506C8.26253 0.952167 7.78765 0.952167 7.49476 1.24506L3.89478 4.84504L4.95544 5.9057L7.27509 3.58605L7.27509 14.9754L8.77509 14.9754L8.77509 3.58605Z" />
-                        </Button>
+                                <Path Data="M8.77509 3.58605L11.0947 5.9057L12.1554 4.84504L8.55542 1.24506C8.26253 0.952167 7.78765 0.952167 7.49476 1.24506L3.89478 4.84504L4.95544 5.9057L7.27509 3.58605L7.27509 14.9754L8.77509 14.9754L8.77509 3.58605Z" />
+                            </Button>
+                        </StackPanel>
+                        <CheckBox Margin="0,8,0,4" Content="Sort Items" />
+                        <CheckBox Margin="0,4" Content="Allow users to enter custom text" />
+                        <CheckBox Margin="0,4">
+                            <TextBlock Text="Submit the selected value immediately" TextWrapping="Wrap" />
+                        </CheckBox>
                     </StackPanel>
-                    <CheckBox Margin="0,8,0,4" Content="Sort Items" />
-                    <CheckBox Margin="0,4" Content="Allow users to enter custom text" />
-                    <CheckBox Margin="0,4">
-                        <TextBlock Text="Submit the selected value immediately" TextWrapping="Wrap" />
-                    </CheckBox>
-                </StackPanel>
+                </Grid>
+
+               
+
+
+
+               
             </TabItem>
 
         </TabControl>

+ 15 - 1
PDF Office/Views/Form/TextFieldProperty.xaml.cs

@@ -1,4 +1,5 @@
-using System;
+using PDF_Office.ViewModels.Form;
+using System;
 using System.Collections.Generic;
 using System.Linq;
 using System.Text;
@@ -20,9 +21,22 @@ namespace PDF_Office.Views.Form
     /// </summary>
     public partial class TextFieldProperty : UserControl
     {
+       public TextFieldPropertyViewModel ViewModel =>DataContext as TextFieldPropertyViewModel;
         public TextFieldProperty()
         {
             InitializeComponent();
+
+           
+        }
+
+        private void EditMenuItem_Click(object sender, RoutedEventArgs e)
+        {
+            var Btnitem = sender as MenuItem;
+            if (Btnitem == null) return;
+            if(ViewModel != null)
+            {
+                ViewModel.ResetColorCommand?.Execute(Btnitem);
+            }
         }
     }
 }

+ 57 - 24
PDF Office/Views/PropertyPanel/AnnotPanel/DynamicPropertyDialog.xaml

@@ -1,28 +1,18 @@
-<UserControl x:Class="PDF_Office.Views.PropertyPanel.AnnotPanel.DynamicPropertyDialog"
-             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:PDF_Office.Views.PropertyPanel.AnnotPanel" xmlns:cus="clr-namespace:PDF_Office.CustomControl" xmlns:annotpanel="clr-namespace:PDF_Office.ViewModels.PropertyPanel.AnnotPanel" xmlns:i="http://schemas.microsoft.com/xaml/behaviors" d:DataContext="{d:DesignInstance Type=annotpanel:DynamicPropertyDialogViewModel}"
-             mc:Ignorable="d" 
-             Width="500"
-             Height="300">
+<UserControl
+    x:Class="PDF_Office.Views.PropertyPanel.AnnotPanel.DynamicPropertyDialog"
+    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+    xmlns:annotpanel="clr-namespace:PDF_Office.ViewModels.PropertyPanel.AnnotPanel"
+    xmlns:cus="clr-namespace:PDF_Office.CustomControl"
+    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+    xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
+    xmlns:local="clr-namespace:PDF_Office.Views.PropertyPanel.AnnotPanel"
+    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+    Width="500"
+    Height="300"
+    d:DataContext="{d:DesignInstance Type={x:Type annotpanel:DynamicPropertyDialogViewModel}}"
+    mc:Ignorable="d">
     <cus:DialogContent Header="动态图章">
-        <cus:DialogContent.Content>
-            <StackPanel Height="50" Grid.Row="1" HorizontalAlignment="Center" Orientation="Horizontal">
-                <CheckBox Name="chkAuthor" IsChecked="{Binding IsChecked}" VerticalAlignment="Center" FontFamily="Seoge UI" FontSize="14" Margin="0 0 0 8" Content="Author" Padding="7 0 0 0" />
-                <TextBox x:Name="txtAuthor" VerticalContentAlignment="Center" IsEnabled="{Binding ElementName=chkAuthor, Path=IsChecked}" Text="{Binding Author,Mode=TwoWay}" Width="152" Height="32" HorizontalAlignment="Right" Margin="0 0 0 8"/>
-                <TextBlock x:Name="lbCreateDate" Grid.Row="1" FontFamily="Seoge UI" FontSize="14" Foreground="Black" VerticalAlignment="Center" Margin="27 0 0 0" Text="Date"/>
-                <ComboBox Name="txtCreateDate" SelectedIndex="{Binding SelectedIndex}" Grid.Row="1" Background ="Transparent"  Width="152" BorderThickness="1" BorderBrush="#FFE2E3E6" HorizontalAlignment="Right" ItemsSource="{Binding DateFormatList}">
-                    <ComboBox.ItemTemplate>
-                        <DataTemplate >
-                            <ComboBoxItem Content="{Binding }">
-                            </ComboBoxItem>
-                        </DataTemplate>
-                    </ComboBox.ItemTemplate>
-                </ComboBox>
-            </StackPanel>
-        </cus:DialogContent.Content>
         <cus:DialogContent.BottmBar>
             <Grid>
                 <Grid.ColumnDefinitions>
@@ -47,5 +37,48 @@
                     Content="取消" />
             </Grid>
         </cus:DialogContent.BottmBar>
+        <StackPanel
+            Grid.Row="1"
+            Height="50"
+            HorizontalAlignment="Center"
+            Orientation="Horizontal">
+            <CheckBox
+                x:Name="chkAuthor"
+                Margin="0,0,0,8"
+                Padding="7,0,0,0"
+                VerticalAlignment="Center"
+                Content="Author"
+                FontFamily="Seoge UI"
+                FontSize="14"
+                IsChecked="{Binding IsChecked}" />
+            <TextBox
+                x:Name="txtAuthor"
+                Width="152"
+                Height="32"
+                Margin="0,0,0,8"
+                HorizontalAlignment="Right"
+                VerticalContentAlignment="Center"
+                IsEnabled="{Binding IsChecked, ElementName=chkAuthor}"
+                Text="{Binding Author, Mode=TwoWay}" />
+            <TextBlock
+                x:Name="lbCreateDate"
+                Grid.Row="1"
+                Margin="27,0,0,0"
+                VerticalAlignment="Center"
+                FontFamily="Seoge UI"
+                FontSize="14"
+                Foreground="Black"
+                Text="Date" />
+            <ComboBox
+                x:Name="txtCreateDate"
+                Grid.Row="1"
+                Width="152"
+                HorizontalAlignment="Right"
+                Background="Transparent"
+                BorderBrush="#FFE2E3E6"
+                BorderThickness="1"
+                ItemsSource="{Binding DateFormatList}"
+                SelectedIndex="{Binding SelectedIndex}" />
+        </StackPanel>
     </cus:DialogContent>
 </UserControl>

+ 3 - 3
PDF Office/Views/PropertyPanel/PDFEdit/TextEditProperty.xaml

@@ -18,9 +18,9 @@
     <UserControl.Resources>
         <ResourceDictionary>
             <ResourceDictionary.MergedDictionaries>
-                <ResourceDictionary Source="../Styles/SliderStyle.xaml"></ResourceDictionary>
-                <ResourceDictionary Source="../Styles/CustomBtnStyle.xaml"/>
-                <ResourceDictionary Source="/../Styles/RadioButtonStyle.xaml"/>
+                <ResourceDictionary Source="../../../Styles/SliderStyle.xaml"></ResourceDictionary>
+                <ResourceDictionary Source="../../../Styles/CustomBtnStyle.xaml"/>
+                <ResourceDictionary Source="../../../Styles/RadioButtonStyle.xaml"/>
             </ResourceDictionary.MergedDictionaries>
 
             <Convert:BoolToVisible x:Key="BoolToVisible"/>

+ 1 - 10
PDF Office/Views/PropertyPanel/PropertyPanelContent.xaml

@@ -16,16 +16,7 @@
         <Convert:PropertyPanelVisible x:Key="PropertyPanelVisible"/>
     </UserControl.Resources>
     <Grid  VerticalAlignment="Stretch">
-        <Grid x:Name="GridAnnot">
-            <!--<AnnotPanel:TextAnnotProperty x:Name="textAnnotProperty"  Visibility="{Binding AnnotPanelType,ConverterParameter=HighLight, Converter={StaticResource PropertyPanelVisible}}"/>-->
-            <!--<AnnotPanel:FreetextAnnotProperty  x:Name="freetextAnnotProperty" Visibility="{Binding AnnotPanelType,ConverterParameter=Freetext,Converter={StaticResource PropertyPanelVisible}}"/>
-            <AnnotPanel:SharpsAnnotProperty  x:Name="sharpsAnnotProperty" Visibility="{Binding AnnotPanelType,ConverterParameter=HighLight,Converter={StaticResource PropertyPanelVisible}}"/>
-            <AnnotPanel:StampAnnotProperty  x:Name="stampAnnotProperty" Visibility="{Binding AnnotPanelType,ConverterParameter=HighLight,Converter={StaticResource PropertyPanelVisible}}"/>
-            <AnnotPanel:FreehandAnnotProperty  x:Name="freehandAnnotProperty" Visibility="{Binding AnnotPanelType,ConverterParameter=HighLight,Converter={StaticResource PropertyPanelVisible}}"/>
-            <AnnotPanel:ImageAnnotProperty  x:Name="imageAnnotProperty" Visibility="{Binding AnnotPanelType,ConverterParameter=HighLight,Converter={StaticResource PropertyPanelVisible}}"/>
-            <AnnotPanel:LinkAnnotProperty  x:Name="linkAnnotProperty" Visibility="{Binding AnnotPanelType,ConverterParameter=HighLight,Converter={StaticResource PropertyPanelVisible}}"/>-->
-
-        </Grid>
+ 
         <Grid>
             
         </Grid>

+ 3 - 3
PDF Office/Views/ViewContent.xaml

@@ -148,7 +148,7 @@
                     Height="28"
                     BorderThickness="0"
                     IsChecked="{Binding IsPropertyOpen}"
-                    Style="{StaticResource subToobar}"
+                    Style="{StaticResource SubToolbarTgb}"
                     ToolTip="Property">
                     <Path
                         Width="20"
@@ -289,8 +289,8 @@
                 Grid.Column="2"
                 HorizontalAlignment="Stretch"
                 prism:RegionManager.RegionName="{Binding ViwerRegionName}" />
-            <ScrollViewer Grid.Column="4" VerticalScrollBarVisibility="Auto">
-                <ContentControl prism:RegionManager.RegionName="{Binding PropertyRegionName}" />
+            <ScrollViewer Name="Scroller" Grid.Column="4" Focusable="False" VerticalScrollBarVisibility="Auto">
+                <ContentControl Height="{Binding ElementName=Scroller, Path=ViewportHeight}" prism:RegionManager.RegionName="{Binding PropertyRegionName}" />
             </ScrollViewer>
         </Grid>