Преглед изворни кода

Merge branch 'dev' into practice2

OYXH\oyxh пре 2 година
родитељ
комит
29c4f05c82
30 измењених фајлова са 1232 додато и 346 уклоњено
  1. 1 0
      PDF Office/App.xaml
  2. 13 4
      PDF Office/CustomControl/CompositeControl/ColorContent.xaml
  3. 33 1
      PDF Office/CustomControl/CompositeControl/ColorContent.xaml.cs
  4. 243 0
      PDF Office/CustomControl/ImageButton.cs
  5. 30 0
      PDF Office/CustomControl/PathRadioButton.cs
  6. 30 0
      PDF Office/DataConvert/CenterToolTipConverter .cs
  7. 35 0
      PDF Office/DataConvert/ColorBrushConvert.cs
  8. 38 0
      PDF Office/DataConvert/ListCountToVisible.cs.cs
  9. 22 6
      PDF Office/PDF Office.csproj
  10. BIN
      PDF Office/Resources/Dialog/AddImage.png
  11. BIN
      PDF Office/Resources/Dialog/AddImageSuspend.png
  12. BIN
      PDF Office/Resources/Dialog/help.png
  13. BIN
      PDF Office/Resources/PropertyPanel/nostamp.png
  14. 96 0
      PDF Office/Styles/ImageButtonStyle.xaml
  15. 1 0
      PDF Office/Styles/PathButtonStyle.xaml
  16. 7 3
      PDF Office/Styles/PathRadioButtonDictionary.xaml
  17. 0 0
      PDF Office/ViewModels/Dialog/CustomCreateDialogViewModel.cs
  18. 0 0
      PDF Office/ViewModels/Dialog/DynamicPropertyDialogViewModel.cs
  19. 24 2
      PDF Office/ViewModels/PropertyPanel/AnnotPanel/StampAnnotPropertyViewModel.cs
  20. 337 0
      PDF Office/Views/Dialog/CustomCreateDialog.xaml
  21. 0 0
      PDF Office/Views/Dialog/CustomCreateDialog.xaml.cs
  22. 4 0
      PDF Office/Views/PropertyPanel/AnnotPanel/DynamicPropertyDialog.xaml
  23. 0 0
      PDF Office/Views/Dialog/DynamicPropertyDialog.xaml.cs
  24. 121 11
      PDF Office/Views/Dialog/Redaction/MarkSettingDialog.xaml
  25. 25 23
      PDF Office/Views/Dialog/Redaction/PageMarkDialog.xaml
  26. 99 43
      PDF Office/Views/Form/EditPresetColorsDialog.xaml
  27. 0 204
      PDF Office/Views/PropertyPanel/AnnotPanel/CustomCreateDialog.xaml
  28. 6 6
      PDF Office/Views/PropertyPanel/AnnotPanel/SharpsAnnotProperty.xaml.cs
  29. 64 40
      PDF Office/Views/PropertyPanel/AnnotPanel/StampAnnotProperty.xaml
  30. 3 3
      PDF Office/Views/PropertyPanel/AnnotPanel/TextAnnotProperty.xaml.cs

+ 1 - 0
PDF Office/App.xaml

@@ -22,6 +22,7 @@
                 <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/ImageButtonStyle.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" />

+ 13 - 4
PDF Office/CustomControl/CompositeControl/ColorContent.xaml

@@ -2,6 +2,7 @@
     x:Class="PDF_Office.CustomControl.CompositeControl.ColorContent"
     xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+    xmlns:convert="clr-namespace:PDF_Office.DataConvert"
     xmlns:cus="clr-namespace:PDF_Office.CustomControl"
     xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
     xmlns:local="clr-namespace:PDF_Office.CustomControl.CompositeControl"
@@ -14,6 +15,8 @@
             <ResourceDictionary.MergedDictionaries>
                 <ResourceDictionary Source="../../Styles/CustomBtnStyle.xaml" />
             </ResourceDictionary.MergedDictionaries>
+
+            <convert:ColorBrushConvert x:Key="colorBrushConvert" />
             <DataTemplate x:Key="listboxData">
                 <Ellipse
                     Width="20"
@@ -69,15 +72,20 @@
                     x:Name="ElcustomColor"
                     Width="20"
                     Height="20"
-                    Fill="Transparent"
+                    Margin="4,0"
+                    Fill="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=local:ColorContent}, Path=SelectedColor, Converter={StaticResource colorBrushConvert}}"
                     PreviewMouseLeftButtonDown="ElcustomColor_PreviewMouseLeftButtonDown" />
-                <cus:ColorDropBox x:Name="ColorDropPicker" SelectedColorChanged="ColorDropPicker_SelectedColorChanged" />
+                <cus:ColorDropBox
+                    x:Name="ColorDropPicker"
+                    Margin="4,0"
+                    SelectedColorChanged="ColorDropPicker_SelectedColorChanged" />
             </StackPanel>
         </Border>
         <cus:ColorDropBox
             x:Name="PnlColor"
             Opacity="0"
-            SelectedColorChanged="PnlColor_SelectedColorChanged" />
+            SelectedColorChanged="PnlColor_SelectedColorChanged"
+            Visibility="{Binding ElementName=ListColor, Path=Visibility}" />
 
         <ListBox
             x:Name="ListColor"
@@ -85,7 +93,8 @@
             BorderThickness="0"
             ItemContainerStyle="{StaticResource listboxItemStyle}"
             ItemTemplate="{StaticResource listboxData}"
-            SelectionChanged="ListColor_SelectionChanged">
+            SelectionChanged="ListColor_SelectionChanged"
+            Visibility="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=local:ColorContent}, Path=ShowColorList}">
             <ListBox.ItemsPanel>
                 <ItemsPanelTemplate>
                     <WrapPanel Orientation="Horizontal" />

+ 33 - 1
PDF Office/CustomControl/CompositeControl/ColorContent.xaml.cs

@@ -54,6 +54,12 @@ namespace PDF_Office.CustomControl.CompositeControl
         {
             Color = defaultColor;
         }
+
+
+
+
+
+
     }
 
     //类说明:
@@ -67,6 +73,31 @@ namespace PDF_Office.CustomControl.CompositeControl
         private ObservableCollection<ColorItem> colors = new ObservableCollection<ColorItem>();
         public event EventHandler<Color> SelectedColorHandler;
         private ColorItem ChangedColorItem;
+
+        /// <summary>
+        /// 选中项的颜色
+        /// </summary>
+        public Color SelectedColor
+        {
+            get { return (Color)GetValue(SelectedColorProperty); }
+            set { SetValue(SelectedColorProperty, value); }
+        }
+
+        public static readonly DependencyProperty SelectedColorProperty =
+            DependencyProperty.Register("SelectedColor", typeof(Color), typeof(ColorContent), new PropertyMetadata((Color)ColorConverter.ConvertFromString("#6C33F8CC")));
+
+
+        public Visibility ShowColorList
+        {
+            get { return (Visibility)GetValue(ShowColorListProperty); }
+            set { SetValue(ShowColorListProperty, value); }
+        }
+
+        // Using a DependencyProperty as the backing store for ShowColorList.  This enables animation, styling, binding, etc...
+        public static readonly DependencyProperty ShowColorListProperty =
+            DependencyProperty.Register("ShowColorList", typeof(Visibility), typeof(ColorContent), new PropertyMetadata(Visibility.Visible));
+
+
         public ColorContent()
         {
             InitializeComponent();
@@ -81,7 +112,8 @@ namespace PDF_Office.CustomControl.CompositeControl
         {
             IsExistForContainer((ElcustomColor.Fill as SolidColorBrush).Color);
             SelectedColorHandler?.Invoke(this, e.Value);
-            ElcustomColor.Fill = new SolidColorBrush(e.Value);
+            //ElcustomColor.Fill = new SolidColorBrush(e.Value);
+            SelectedColor = e.Value;
         }
 
         private void ListColor_SelectionChanged(object sender, SelectionChangedEventArgs e)

+ 243 - 0
PDF Office/CustomControl/ImageButton.cs

@@ -0,0 +1,243 @@
+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 ImageButton : Button
+    {
+        static ImageButton()
+        {
+            DefaultStyleKeyProperty.OverrideMetadata(typeof(ImageButton), new FrameworkPropertyMetadata(typeof(ImageButton)));
+        }
+
+        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(ImageButton));
+
+        /// <summary>  
+        /// 鼠标按下去的背景颜色  
+        /// </summary>  
+        public static readonly DependencyProperty MouseDownBackgroundProperty
+            = DependencyProperty.Register("MouseDownBackground", typeof(Brush), typeof(ImageButton));
+
+        /// <summary>  
+        /// 鼠标移上去的字体颜色  
+        /// </summary>  
+        public static readonly DependencyProperty MouseOverForegroundProperty
+            = DependencyProperty.Register("MouseOverForeground", typeof(Brush), typeof(ImageButton), new PropertyMetadata(null, null));
+
+        /// <summary>  
+        /// 鼠标按下去的字体颜色  
+        /// </summary>  
+        public static readonly DependencyProperty MouseDownForegroundProperty
+            = DependencyProperty.Register("MouseDownForeground", typeof(Brush), typeof(ImageButton), new PropertyMetadata(null, null));
+
+        /// <summary>  
+        /// 鼠标移上去的边框颜色  
+        /// </summary>  
+        public static readonly DependencyProperty MouseOverBorderBrushProperty
+            = DependencyProperty.Register("MouseOverBorderBrush", typeof(Brush), typeof(ImageButton), new PropertyMetadata(null, null));
+
+        /// <summary>  
+        /// 鼠标按下去的边框颜色  
+        /// </summary>  
+        public static readonly DependencyProperty MouseDownBorderBrushProperty
+            = DependencyProperty.Register("MouseDownBorderBrush", typeof(Brush), typeof(ImageButton), new PropertyMetadata(null, null));
+
+        /// <summary>  
+        /// 圆角  
+        /// </summary>  
+        public static readonly DependencyProperty CornerRadiusProperty
+            = DependencyProperty.Register("CornerRadius", typeof(CornerRadius), typeof(ImageButton), null);
+
+        //图标  
+        public static readonly DependencyProperty IconProperty
+            = DependencyProperty.Register("Icon", typeof(ImageSource), typeof(ImageButton), null);
+
+        //鼠标移上去的图标图标  
+        public static readonly DependencyProperty IconMouseOverProperty
+            = DependencyProperty.Register("IconMouseOver", typeof(ImageSource), typeof(ImageButton), null);
+
+        //鼠标按下去的图标图标  
+        public static readonly DependencyProperty IconPressProperty
+            = DependencyProperty.Register("IconPress", typeof(ImageSource), typeof(ImageButton), null);
+
+        //图标高度  
+        public static readonly DependencyProperty IconHeightProperty
+            = DependencyProperty.Register("IconHeight", typeof(double), typeof(ImageButton), new PropertyMetadata(24.0, null));
+
+        //图标宽度  
+        public static readonly DependencyProperty IconWidthProperty
+            = DependencyProperty.Register("IconWidth", typeof(double), typeof(ImageButton), new PropertyMetadata(24.0, null));
+
+        //图标和内容的对齐方式  
+        public static readonly DependencyProperty IconContentOrientationProperty
+            = DependencyProperty.Register("IconContentOrientation", typeof(Orientation), typeof(ImageButton), new PropertyMetadata(Orientation.Horizontal, null));
+
+        //图标和内容的距离  
+        public static readonly DependencyProperty IconContentMarginProperty
+            = DependencyProperty.Register("IconContentMargin", typeof(Thickness), typeof(ImageButton), 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 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
+    }
+}

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

@@ -103,6 +103,18 @@ namespace PDF_Office.CustomControl
         public static readonly DependencyProperty MouseDownBackgroundProperty
             = DependencyProperty.Register("MouseDownBackground", typeof(Brush), typeof(PathRadioButton));
 
+        /// <summary>  
+        /// 鼠标移上去的背景颜色透明度 
+        /// </summary>  
+        public static readonly DependencyProperty MouseOverBackgroundOpacityProperty
+                = DependencyProperty.Register("MouseOverBackgroundOpacity", typeof(double), typeof(PathRadioButton), new PropertyMetadata(1.0, null));
+
+        /// <summary>  
+        /// 鼠标按下去的背景颜色透明度  
+        /// </summary>  
+        public static readonly DependencyProperty MouseDownBackgroundOpacityProperty
+            = DependencyProperty.Register("MouseDownBackgroundOpacity", typeof(double), typeof(PathRadioButton), new PropertyMetadata(1.0, null));
+
         /// <summary>  
         /// 鼠标移上去的字体颜色  
         /// </summary>  
@@ -219,6 +231,24 @@ namespace PDF_Office.CustomControl
             set { SetValue(MouseDownBackgroundProperty, value); }
         }
 
+        public double MouseOverBackgroundOpacity
+        {
+            get
+            {
+                return (double)GetValue(MouseOverBackgroundOpacityProperty);
+            }
+            set { SetValue(MouseOverBackgroundOpacityProperty, value); }
+        }
+
+        public double MouseDownBackgroundOpacity
+        {
+            get
+            {
+                return (double)GetValue(MouseDownBackgroundOpacityProperty);
+            }
+            set { SetValue(MouseDownBackgroundOpacityProperty, value); }
+        }
+
         public Brush MouseOverForeground
         {
             get

+ 30 - 0
PDF Office/DataConvert/CenterToolTipConverter .cs

@@ -0,0 +1,30 @@
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Data;
+
+namespace PDF_Office.DataConvert
+{
+    public class CenterToolTipConverter : IMultiValueConverter
+    {
+        public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture)
+        {
+            if (values.FirstOrDefault(v => v == DependencyProperty.UnsetValue) != null)
+            {
+                return double.NaN;
+            }
+            double placementTargetWidth = (double)values[0];
+            double toolTipWidth = (double)values[1];
+            return (placementTargetWidth / 4.0*3) - (toolTipWidth / 2.0);
+        }
+
+        public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture)
+        {
+            throw new NotSupportedException();
+        }
+    }
+}

+ 35 - 0
PDF Office/DataConvert/ColorBrushConvert.cs

@@ -0,0 +1,35 @@
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Data;
+using System.Windows.Media;
+
+namespace PDF_Office.DataConvert
+{
+    /// <summary>
+    /// Color to SolidColorBrush
+    /// </summary>
+    public class ColorBrushConvert : IValueConverter
+    {
+        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
+        {
+            if((Color)value!=null)
+            {
+                return new SolidColorBrush((Color)value);
+            }
+            return Brushes.White;
+        }
+
+        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
+        {
+           if((SolidColorBrush)value!=null)
+            {
+                return ((SolidColorBrush)value).Color;
+            }
+            return Brushes.White.Color;
+        }
+    }
+}

+ 38 - 0
PDF Office/DataConvert/ListCountToVisible.cs.cs

@@ -0,0 +1,38 @@
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Data;
+
+namespace PDF_Office.DataConvert
+{
+    public class ListCountToVisible : IValueConverter
+    {
+        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
+        {
+            if (value == null)
+            {
+                return Visibility.Collapsed;
+            }
+            else
+            {
+                if ((int)value==0)
+                {
+                    return Visibility.Visible;
+                }
+                else
+                {
+                    return Visibility.Collapsed;
+                }
+            }
+        }
+
+        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
+        {
+            throw new NotImplementedException();
+        }
+    }
+}

+ 22 - 6
PDF Office/PDF Office.csproj

@@ -212,6 +212,7 @@
       <DependentUpon>FormFieldCombox.xaml</DependentUpon>
     </Compile>
     <Compile Include="CustomControl\IconAndTextTabItem.cs" />
+    <Compile Include="CustomControl\ImageButton.cs" />
     <Compile Include="CustomControl\ImageRadioButton .cs" />
     <Compile Include="CustomControl\ListBoxItemToolBar.cs" />
     <Compile Include="CustomControl\MenuItemWithPath.cs" />
@@ -241,6 +242,8 @@
     </Compile>
     <Compile Include="DataConvert\AnnotateFontSizeConverter.cs" />
     <Compile Include="DataConvert\BoolToTextWrapConvert.cs" />
+    <Compile Include="DataConvert\CenterToolTipConverter .cs" />
+    <Compile Include="DataConvert\ColorBrushConvert.cs" />
     <Compile Include="DataConvert\CreateTimeToDate.cs" />
     <Compile Include="DataConvert\FileFormatToIconConvert.cs" />
     <Compile Include="DataConvert\GroupHeaderConverter.cs" />
@@ -249,6 +252,7 @@
     <Compile Include="DataConvert\IntAndTagToBoolMultiBinding.cs" />
     <Compile Include="DataConvert\IntToColorBrush.cs" />
     <Compile Include="DataConvert\InvertBoolConvert.cs" />
+    <Compile Include="DataConvert\ListCountToVisible.cs.cs" />
     <Compile Include="DataConvert\ObjectConvert.cs" />
     <Compile Include="DataConvert\PropertyPanelVisible.cs" />
     <Compile Include="DataConvert\StringToDateConvert.cs" />
@@ -405,8 +409,8 @@
     <Compile Include="ViewModels\PropertyPanel\PDFEdit\TextEditPropertyViewModel.cs" />
     <Compile Include="ViewModels\PropertyPanel\ViewModular\ReadViewContentViewModel.cs" />
     <Compile Include="ViewModels\HomePanel\RecentFiles\RecentFilesContentViewModel.cs" />
-    <Compile Include="ViewModels\PropertyPanel\AnnotPanel\CustomCreateDialogViewModel.cs" />
-    <Compile Include="ViewModels\PropertyPanel\AnnotPanel\DynamicPropertyDialogViewModel.cs" />
+    <Compile Include="ViewModels\Dialog\CustomCreateDialogViewModel.cs" />
+    <Compile Include="ViewModels\Dialog\DynamicPropertyDialogViewModel.cs" />
     <Compile Include="ViewModels\Tools\ConverterBarContentViewModel.cs" />
     <Compile Include="ViewModels\Dialog\ExtractDialogViewModel.cs" />
     <Compile Include="ViewModels\Dialog\FullScreenWindowViewModel.cs" />
@@ -800,10 +804,10 @@
     <Compile Include="CustomControl\CompositeControl\SlidContentPop.xaml.cs">
       <DependentUpon>SlidContentPop.xaml</DependentUpon>
     </Compile>
-    <Compile Include="Views\PropertyPanel\AnnotPanel\CustomCreateDialog.xaml.cs">
+    <Compile Include="Views\Dialog\CustomCreateDialog.xaml.cs">
       <DependentUpon>CustomCreateDialog.xaml</DependentUpon>
     </Compile>
-    <Compile Include="Views\PropertyPanel\AnnotPanel\DynamicPropertyDialog.xaml.cs">
+    <Compile Include="Views\Dialog\DynamicPropertyDialog.xaml.cs">
       <DependentUpon>DynamicPropertyDialog.xaml</DependentUpon>
     </Compile>
     <Compile Include="Views\PropertyPanel\AnnotPanel\FreehandAnnotProperty.xaml.cs">
@@ -967,6 +971,10 @@
       <Generator>MSBuild:Compile</Generator>
       <SubType>Designer</SubType>
     </Page>
+    <Page Include="Styles\ImageButtonStyle.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
     <Page Include="Styles\ImageRadioButtonDictionary.xaml">
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
@@ -1342,11 +1350,11 @@
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
     </Page>
-    <Page Include="Views\PropertyPanel\AnnotPanel\CustomCreateDialog.xaml">
+    <Page Include="Views\Dialog\CustomCreateDialog.xaml">
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
     </Page>
-    <Page Include="Views\PropertyPanel\AnnotPanel\DynamicPropertyDialog.xaml">
+    <Page Include="Views\Dialog\DynamicPropertyDialog.xaml">
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
     </Page>
@@ -1665,6 +1673,13 @@
     <Resource Include="Resources\StampIcons\SignHere.png" />
     <Resource Include="Resources\StampIcons\Void.png" />
     <Resource Include="Resources\StampIcons\Witness.png" />
+    <Resource Include="Resources\Dialog\AddImage.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </Resource>
+    <Resource Include="Resources\Dialog\AddImageSuspend.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </Resource>
+    <Resource Include="Resources\Dialog\help.png" />
     <Content Include="Resources\PageEdit\GridLine.jpg">
       <CopyToOutputDirectory>Always</CopyToOutputDirectory>
     </Content>
@@ -1676,6 +1691,7 @@
     </Content>
     <Resource Include="Resources\EditTools\watermark_bg.png" />
     <Resource Include="Resources\PropertyPanel\EmptyAnnot.png" />
+    <Resource Include="Resources\PropertyPanel\nostamp.png" />
     <Content Include="source\AnalysisWord\Res\_rels\.rels">
       <CopyToOutputDirectory>Always</CopyToOutputDirectory>
     </Content>

BIN
PDF Office/Resources/Dialog/AddImage.png


BIN
PDF Office/Resources/Dialog/AddImageSuspend.png


BIN
PDF Office/Resources/Dialog/help.png


BIN
PDF Office/Resources/PropertyPanel/nostamp.png


+ 96 - 0
PDF Office/Styles/ImageButtonStyle.xaml

@@ -0,0 +1,96 @@
+<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:ImageButton}">
+        <Setter Property="Background" Value="Transparent" />
+        <Setter Property="Template">
+            <Setter.Value>
+                <ControlTemplate TargetType="{x:Type customControl:ImageButton}">
+
+                    <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" />
+                                    </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:ImageButton}}}" />
+                            <Setter TargetName="PART_Border" Property="Background" Value="{Binding MouseOverBackground, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type customControl:ImageButton}}}" />
+                            <Setter TargetName="PART_Border" Property="BorderBrush" Value="{Binding MouseOverBorderBrush, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type customControl:ImageButton}}}" />
+                            <Setter TargetName="PART_MouseOverIcon" Property="Visibility" Value="Visible" />
+                            <Setter TargetName="PART_Icon" Property="Visibility" Value="Collapsed" />
+                            <Setter TargetName="PART_PressIcon" 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:ImageButton}}}" />
+                            <Setter TargetName="PART_Border" Property="Background" Value="{Binding MouseDownBackground, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type customControl:ImageButton}}}" />
+                            <Setter TargetName="PART_Border" Property="BorderBrush" Value="{Binding MouseDownBorderBrush, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type customControl:ImageButton}}}" />
+                            <Setter TargetName="PART_PressIcon" Property="Visibility" Value="Visible" />
+                            <Setter TargetName="PART_Icon" Property="Visibility" Value="Collapsed" />
+                            <Setter TargetName="PART_MouseOverIcon" Property="Visibility" Value="Collapsed" />
+                        </Trigger>
+
+                        <Trigger Property="IsEnabled" Value="False">
+                            <Setter Property="Opacity" Value="0.5" />
+                        </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/PathButtonStyle.xaml

@@ -74,6 +74,7 @@
                                         Text="{TemplateBinding Content}"
                                         TextTrimming="CharacterEllipsis" />
                                 </StackPanel>
+                                <ContentPresenter  Focusable="False" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                             </Grid>
                         </Grid>
                     </Border>

+ 7 - 3
PDF Office/Styles/PathRadioButtonDictionary.xaml

@@ -72,6 +72,7 @@
                                         Text="{TemplateBinding Content}"
                                         TextTrimming="CharacterEllipsis" />
                                 </StackPanel>
+                                <ContentPresenter  Focusable="False" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                             </Grid>
                         </Grid>
                     </Border>
@@ -80,6 +81,7 @@
                         <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="Opacity" Value="{Binding MouseOverBackgroundOpacity, 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" />
@@ -90,6 +92,7 @@
                         <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="Opacity" Value="{Binding MouseDownBackgroundOpacity, 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" />
@@ -102,9 +105,10 @@
                         </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_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="Opacity" Value="{Binding MouseDownBackgroundOpacity, 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_MouseOverIcon" Property="Visibility" Value="Collapsed" />
                             <Setter TargetName="PART_Icon" Property="Visibility" Value="Collapsed" />
                             <Setter TargetName="PART_PressIcon" Property="Visibility" Value="Collapsed" />

PDF Office/ViewModels/PropertyPanel/AnnotPanel/CustomCreateDialogViewModel.cs → PDF Office/ViewModels/Dialog/CustomCreateDialogViewModel.cs


PDF Office/ViewModels/PropertyPanel/AnnotPanel/DynamicPropertyDialogViewModel.cs → PDF Office/ViewModels/Dialog/DynamicPropertyDialogViewModel.cs


+ 24 - 2
PDF Office/ViewModels/PropertyPanel/AnnotPanel/StampAnnotPropertyViewModel.cs

@@ -128,6 +128,19 @@ namespace PDF_Office.ViewModels.PropertyPanel.AnnotPanel
             }
         }
 
+        private int cusListboxIndex=-1;
+
+        public int CusListboxIndex
+        {
+            get { return cusListboxIndex; }
+            set
+            {
+                SetProperty(ref cusListboxIndex, value);
+            }
+        }
+
+
+        
         private bool unStandard;
         /// <summary>
         /// 判断当前是否为非标准图章,控制UI展示
@@ -448,8 +461,14 @@ namespace PDF_Office.ViewModels.PropertyPanel.AnnotPanel
                 {
                     Author = DynamicVM.Author;
                     IsSetAuthor = DynamicVM.IsChecked;
-                    //需要加多语判断
-                    dateType = DynamicVM.SelectedIndex == 0 ? "F" : DynamicVM.DateFormatList[DynamicVM.SelectedIndex] + " HH:mm:ss";
+                    if (Settings.Default.AppProperties.culture == "en-US")
+                    {
+                        dateType = DynamicVM.SelectedIndex == 0 ? "F" : DynamicVM.DateFormatList[DynamicVM.SelectedIndex] + " HH:mm:ss";
+                    }
+                    else
+                    {
+                        dateType = DynamicVM.SelectedIndex == 0 ? "r" : DynamicVM.DateFormatList[DynamicVM.SelectedIndex] + " HH:mm:ss";
+                    }
                     UpDataDynamicStampList();
                 }
             });
@@ -598,6 +617,9 @@ namespace PDF_Office.ViewModels.PropertyPanel.AnnotPanel
             annote.IsCheckedTime = stamp.IsCheckedTime;
             stamps.Add(annote);
             Settings.Default.Save();
+
+            SetStamp(stamp);
+            CusListboxIndex = CustomStampList.Count-1;
         }
     }
 }

Разлика између датотеке није приказан због своје велике величине
+ 337 - 0
PDF Office/Views/Dialog/CustomCreateDialog.xaml


PDF Office/Views/PropertyPanel/AnnotPanel/CustomCreateDialog.xaml.cs → PDF Office/Views/Dialog/CustomCreateDialog.xaml.cs


+ 4 - 0
PDF Office/Views/PropertyPanel/AnnotPanel/DynamicPropertyDialog.xaml

@@ -8,8 +8,10 @@
     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"
+    xmlns:prism="http://prismlibrary.com/"
     Width="500"
     Height="300"
+    prism:Dialog.WindowStyle="{StaticResource DialogWindowStyle}"
     d:DataContext="{d:DesignInstance Type={x:Type annotpanel:DynamicPropertyDialogViewModel}}"
     mc:Ignorable="d">
     <cus:DialogContent Header="动态图章">
@@ -25,6 +27,7 @@
                     Height="32"
                     Margin="25,0,0,0"
                     HorizontalAlignment="Left"
+                    Style="{StaticResource Btn.cta}"
                     Command="{Binding ApplyCommnad}"
                     Content="确定" />
                 <Button
@@ -33,6 +36,7 @@
                     Height="32"
                     Margin="0,0,25,0"
                     HorizontalAlignment="Right"
+                    Style="{StaticResource btn.sec}"
                     Command="{Binding CancelCommand}"
                     Content="取消" />
             </Grid>

PDF Office/Views/PropertyPanel/AnnotPanel/DynamicPropertyDialog.xaml.cs → PDF Office/Views/Dialog/DynamicPropertyDialog.xaml.cs


+ 121 - 11
PDF Office/Views/Dialog/Redaction/MarkSettingDialog.xaml

@@ -1,12 +1,122 @@
-<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
+    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:com="clr-namespace:PDF_Office.CustomControl.CompositeControl"
+    xmlns:convert="clr-namespace:PDF_Office.DataConvert"
+    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="462"
+    d:DesignHeight="450"
+    d:DesignWidth="800"
+    prism:Dialog.WindowStyle="{StaticResource DialogWindowStyle}"
+    prism:ViewModelLocator.AutoWireViewModel="True"
+    Background="{StaticResource color.sys.layout.anti}"
+    mc:Ignorable="d">
+    <UserControl.Resources>
+        <convert:InvertBoolConvert x:Key="InvertBoolConvert" />
+    </UserControl.Resources>
+    <cus:DialogContent Header="Settings">
+        <StackPanel Margin="16,0">
+            <Grid Height="24">
+                <TextBlock
+                    VerticalAlignment="Center"
+                    FontSize="12"
+                    Foreground="{StaticResource color.sys.text.neutral.lv2}"
+                    Text="Marker Color" />
+            </Grid>
+            <StackPanel
+                Height="32"
+                Margin="0,8"
+                Orientation="Horizontal">
+                <TextBlock
+                    Name="TbOurline"
+                    VerticalAlignment="Center"
+                    Text="Redaction Mark Outline Color:" />
+                <com:ColorContent Margin="16,0,0,0" ShowColorList="Collapsed" />
+            </StackPanel>
+            <StackPanel Height="32" Orientation="Horizontal">
+                <TextBlock
+                    Width="{Binding ElementName=TbOurline, Path=Width}"
+                    VerticalAlignment="Center"
+                    Text="Redact Area Fill Color:" />
+                <com:ColorContent Margin="16,0,0,0" ShowColorList="Collapsed" />
+            </StackPanel>
+            <CheckBox
+                Name="chkText"
+                Margin="0,16,0,8"
+                Content="Use Overlay Text" />
+            <Border
+                Width="400"
+                Height="198"
+                Background="{StaticResource color.sys.layout.mg}"
+                CornerRadius="4"
+                IsEnabled="{Binding ElementName=chkText, Path=IsChecked, Converter={StaticResource InvertBoolConvert}}">
+                <StackPanel Margin="8">
+                    <cus:TextBoxEx
+                        Height="70"
+                        VerticalContentAlignment="Top"
+                        Text="123" />
+                    <TextBlock
+                        Margin="0,10"
+                        FontSize="12"
+                        Foreground="{StaticResource color.sys.text.neutral.lv2}"
+                        Text="Font" />
+
+                    <StackPanel Orientation="Horizontal">
+                        <ComboBox Width="122.67" Height="32" />
+                        <ComboBox
+                            Width="122.67"
+                            Height="32"
+                            Margin="8,0" />
+                        <ComboBox Width="122.67" Height="32" />
+                    </StackPanel>
+                    <StackPanel Margin="0,8,0,0" Orientation="Horizontal">
+                        <RadioButton
+                            Width="32"
+                            Height="32"
+                            Style="{StaticResource RectangleRadionButtonWithCorner}" />
+                        <RadioButton
+                            Width="32"
+                            Height="32"
+                            Margin="8,0"
+                            Style="{StaticResource RectangleRadionButtonWithCorner}" />
+                        <RadioButton
+                            Width="32"
+                            Height="32"
+                            Style="{StaticResource RectangleRadionButtonWithCorner}" />
+                        <RadioButton
+                            Width="32"
+                            Height="32"
+                            Margin="8,0"
+                            Style="{StaticResource RectangleRadionButtonWithCorner}" />
+                        <com:ColorContent Margin="16,0,0,0" ShowColorList="Collapsed" />
+                    </StackPanel>
+                </StackPanel>
+            </Border>
+
+        </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>

+ 25 - 23
PDF Office/Views/Dialog/Redaction/PageMarkDialog.xaml

@@ -17,11 +17,30 @@
     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" />
+            <RadioButton
+                Height="22"
+                VerticalContentAlignment="Center"
+                Content="Mark current page"
+                IsChecked="True" />
+            <RadioButton
+                Height="22"
+                Margin="0,8"
+                VerticalContentAlignment="Center"
+                Content="Mark all page" />
+            <RadioButton
+                Height="22"
+                VerticalContentAlignment="Center"
+                Content="Mark odd page" />
+            <RadioButton
+                Height="22"
+                Margin="0,8"
+                VerticalContentAlignment="Center"
+                Content="Mark even page" />
+            <RadioButton
+                Name="RbtnCustomPage"
+                Height="22"
+                VerticalContentAlignment="Center"
+                Content="Mark specific page range" />
             <StackPanel
                 Margin="0,8"
                 HorizontalAlignment="Left"
@@ -39,23 +58,6 @@
                     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>

+ 99 - 43
PDF Office/Views/Form/EditPresetColorsDialog.xaml

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

+ 0 - 204
PDF Office/Views/PropertyPanel/AnnotPanel/CustomCreateDialog.xaml

@@ -1,204 +0,0 @@
-<UserControl x:Class="PDF_Office.Views.PropertyPanel.AnnotPanel.CustomCreateDialog"
-             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
-             xmlns:customcontrol="clr-namespace:PDF_Office.CustomControl"
-             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" xmlns:dataconvert="clr-namespace:PDF_Office.DataConvert" d:DataContext="{d:DesignInstance Type=annotpanel:CustomCreateDialogViewModel}"
-             mc:Ignorable="d" >
-
-    <UserControl.Resources>
-        <PathGeometry x:Key="Ic_AddButtonPath" Figures="M8.5,2.5 L8.5,7.5 L13.5,7.5 L13.5,8.5 L8.5,8.5 L8.5,13.5 L7.5,13.5 L7.5,8.5 L2.5,8.5 L2.5,7.5 L7.5,7.5 L7.5,2.5 L8.5,2.5 Z"/>
-        <dataconvert:UnVisivleConvert x:Key="UnVisivleConvert"/>
-        <dataconvert:IntAndTagToBoolMultiBinding x:Key="IntAndTagToBoolMultiBinding"/>
-    </UserControl.Resources>
-    <cus:DialogContent Header="新建图章">
-        <cus:DialogContent.Content>
-            <TabControl Grid.Row="1" Name="StampTabControl" SelectedIndex="2"  HorizontalAlignment="Center" HorizontalContentAlignment="Center" Style="{StaticResource TabControlWithUnderLineStyle}">
-                <TabItem x:Name="文字图章"
-                        Header="文字图章"
-                        FontFamily="Segoe UI" Foreground="#FF666666"
-                        HorizontalContentAlignment="Center"
-                        FontSize="16"
-                        Height="40"
-                        Width="88"
-                        IsSelected="True">
-                    <Grid>
-                        <Grid.RowDefinitions>
-                            <RowDefinition Height="*"/>
-                            <RowDefinition Height="*"/>
-                            <RowDefinition Height="*"/>
-                            <RowDefinition Height="*"/>
-                        </Grid.RowDefinitions>
-                        <Image Height="50" Source="{Binding TextImageSource}"/>
-                        <TextBox Grid.Row="1" Text="{Binding StampText,Mode=TwoWay}" TextChanged="TextBox_TextChanged">
-                            <i:Interaction.Triggers>
-                                <i:EventTrigger EventName="LostFocus">
-                                    <i:InvokeCommandAction Command="{Binding UpDataDynamicCommnad}" PassEventArgsToCommand="True" />
-                                </i:EventTrigger>
-                                <i:EventTrigger EventName="KeyDown">
-                                    <i:InvokeCommandAction Command="{Binding KeyDown}" PassEventArgsToCommand="True" />
-                                </i:EventTrigger>
-                            </i:Interaction.Triggers>
-                        </TextBox>
-                        <Grid Grid.Row="2">
-                            <StackPanel Orientation="Horizontal">
-                                <RadioButton Tag="1" Checked="RadioButton_Checked" >
-                                    <RadioButton.IsChecked>
-                                        <MultiBinding Converter="{StaticResource IntAndTagToBoolMultiBinding }" Mode="OneWay">
-                                            <Binding Source="1"/>
-                                            <Binding Path="RadioButtonIndex"/>
-                                        </MultiBinding>
-                                    </RadioButton.IsChecked>
-                                </RadioButton>
-                                <RadioButton Tag="2" Checked="RadioButton_Checked">
-                                    <RadioButton.IsChecked>
-                                        <MultiBinding Converter="{StaticResource IntAndTagToBoolMultiBinding }" Mode="OneWay">
-                                            <Binding Source="2"/>
-                                            <Binding Path="RadioButtonIndex"/>
-                                        </MultiBinding>
-                                    </RadioButton.IsChecked>
-                                </RadioButton>
-                                <RadioButton Tag="3" Checked="RadioButton_Checked">
-                                    <RadioButton.IsChecked>
-                                        <MultiBinding  Converter="{StaticResource IntAndTagToBoolMultiBinding }" Mode="OneWay">
-                                            <Binding Source="3"/>
-                                            <Binding Path="RadioButtonIndex"/>
-                                        </MultiBinding>
-                                    </RadioButton.IsChecked>
-                                </RadioButton>
-                                <RadioButton Tag="4" Checked="RadioButton_Checked">
-                                    <RadioButton.IsChecked>
-                                        <MultiBinding Converter="{StaticResource IntAndTagToBoolMultiBinding }" Mode="OneWay">
-                                            <Binding Source="4"/>
-                                            <Binding Path="RadioButtonIndex"/>
-                                        </MultiBinding>
-                                    </RadioButton.IsChecked>
-                                </RadioButton>
-                                <RadioButton Tag="5" Checked="RadioButton_Checked">
-                                    <RadioButton.IsChecked>
-                                        <MultiBinding Converter="{StaticResource IntAndTagToBoolMultiBinding }" Mode="OneWay">
-                                            <Binding Source="5"/>
-                                            <Binding Path="RadioButtonIndex"/>
-                                        </MultiBinding>
-                                    </RadioButton.IsChecked>
-                                </RadioButton>
-                                <RadioButton Tag="6" Checked="RadioButton_Checked">
-                                    <RadioButton.IsChecked>
-                                        <MultiBinding Converter="{StaticResource IntAndTagToBoolMultiBinding }" Mode="OneWay">
-                                            <Binding Source="6"/>
-                                            <Binding Path="RadioButtonIndex"/>
-                                        </MultiBinding>
-                                    </RadioButton.IsChecked>
-                                </RadioButton>
-                                <RadioButton Tag="7" Checked="RadioButton_Checked">
-                                    <RadioButton.IsChecked>
-                                        <MultiBinding Converter="{StaticResource IntAndTagToBoolMultiBinding }" Mode="OneWay">
-                                            <Binding Source="7"/>
-                                            <Binding Path="RadioButtonIndex"/>
-                                        </MultiBinding>
-                                    </RadioButton.IsChecked>
-                                </RadioButton>
-                                <RadioButton Tag="8" Checked="RadioButton_Checked">
-                                    <RadioButton.IsChecked>
-                                        <MultiBinding Converter="{StaticResource IntAndTagToBoolMultiBinding }" Mode="OneWay">
-                                            <Binding Source="8"/>
-                                            <Binding Path="RadioButtonIndex"/>
-                                        </MultiBinding>
-                                    </RadioButton.IsChecked>
-                                </RadioButton>
-                                <RadioButton Tag="9" Checked="RadioButton_Checked">
-                                    <RadioButton.IsChecked>
-                                        <MultiBinding Converter="{StaticResource IntAndTagToBoolMultiBinding }" Mode="OneWay">
-                                            <Binding Source="9"/>
-                                            <Binding Path="RadioButtonIndex"/>
-                                        </MultiBinding>
-                                    </RadioButton.IsChecked>
-                                </RadioButton>
-                                <RadioButton Tag="10" Checked="RadioButton_Checked">
-                                    <RadioButton.IsChecked>
-                                        <MultiBinding Converter="{StaticResource IntAndTagToBoolMultiBinding }" Mode="OneWay">
-                                            <Binding Source="10"/>
-                                            <Binding Path="RadioButtonIndex"/>
-                                        </MultiBinding>
-                                    </RadioButton.IsChecked>
-                                </RadioButton>
-                                <RadioButton Tag="11" Checked="RadioButton_Checked">
-                                    <RadioButton.IsChecked>
-                                        <MultiBinding Converter="{StaticResource IntAndTagToBoolMultiBinding}" Mode="OneWay">
-                                            <Binding Source="11"/>
-                                            <Binding Path="RadioButtonIndex"/>
-                                        </MultiBinding>
-                                    </RadioButton.IsChecked>
-                                </RadioButton>
-                            </StackPanel>
-                        </Grid>
-                        <StackPanel Grid.Row="3" Orientation="Horizontal" HorizontalAlignment="Center">
-                            <CheckBox Name="Date" VerticalAlignment="Center" FontFamily="Seoge UI" FontSize="14" Content="Date" Padding="7 0 0 0" IsChecked="{Binding IsCheckedDate,Mode=TwoWay}"/>
-                            <CheckBox Name="Time" VerticalAlignment="Center" FontFamily="Seoge UI" FontSize="14" Content="Time" Padding="7 0 0 0" IsChecked="{Binding IsCheckedTime,Mode=TwoWay}"/>
-                        </StackPanel>
-                    </Grid>
-                </TabItem>
-                <TabItem  x:Name="图片图章"
-                        Header="图片图章"
-                        FontFamily="Segoe UI" Foreground="#FF666666"
-                        HorizontalContentAlignment="Center"
-                        FontSize="16"
-                        Width="86">
-                    <Grid >
-                        <Grid.RowDefinitions>
-                            <RowDefinition Height="*"/>
-                            <RowDefinition Height="20"/>
-                        </Grid.RowDefinitions>
-                        <customcontrol:PathButton
-                        x:Name="BtnAdd"
-                        Height="24" Width="24"  IconHeight="20"  IconWidth="20" 
-                        Icon="{StaticResource Ic_AddButtonPath}"  IconFill="Red"
-                        IconPress="{StaticResource Ic_AddButtonPath}" IconPressFill="#C04CF8"
-                        IconMouseOver="{StaticResource Ic_AddButtonPath}" IconMouseOverFill="#C04CF8" Visibility="{Binding ShowImageButton}"  Command="{Binding OpenImageCommnad}"/>
-                        <Grid Background="Red" Visibility="{Binding ElementName=BtnAdd,Path=Visibility,Converter={StaticResource UnVisivleConvert}}">
-                            <Grid.RowDefinitions>
-                                <RowDefinition Height="24"/>
-                                <RowDefinition Height="*"/>
-                            </Grid.RowDefinitions>
-                            <Image Grid.RowSpan="2" Width="200" Height="200" Source="{Binding ImagePreviewSource}" />
-
-                            <customcontrol:PathButton
-                            x:Name="BtnReAdd"
-                            HorizontalAlignment="Right" VerticalAlignment="Top"
-                            Height="24" Width="24"  IconHeight="20"  IconWidth="20" 
-                            Icon="{StaticResource Ic_AddButtonPath}"  IconFill="Red"
-                            IconPress="{StaticResource Ic_AddButtonPath}" IconPressFill="#C04CF8"
-                            IconMouseOver="{StaticResource Ic_AddButtonPath}" IconMouseOverFill="#C04CF8" Command="{Binding OpenImageCommnad}"/>
-                        </Grid>
-                        <CheckBox Grid.Row="1" Width="20" Height="20" IsChecked="{Binding IsRemoveBackground}"/>
-                    </Grid>
-                </TabItem>
-            </TabControl>
-        </cus:DialogContent.Content>
-        <cus:DialogContent.BottmBar>
-            <Grid>
-                <Grid.ColumnDefinitions>
-                    <ColumnDefinition Width="50*" />
-                    <ColumnDefinition Width="50*" />
-                </Grid.ColumnDefinitions>
-                <Button
-                    Grid.Column="0"
-                    Width="150"
-                    Height="32"
-                    Margin="25,0,0,0"
-                    HorizontalAlignment="Left"
-                    Command="{Binding CreateCommnad}"
-                    Content="确定" />
-                <Button
-                    Grid.Column="1"
-                    Width="150"
-                    Height="32"
-                    Margin="0,0,25,0"
-                    HorizontalAlignment="Right"
-                    Command="{Binding CancelCommand}"
-                    Content="取消" />
-            </Grid>
-        </cus:DialogContent.BottmBar>
-    </cus:DialogContent>
-</UserControl>

+ 6 - 6
PDF Office/Views/PropertyPanel/AnnotPanel/SharpsAnnotProperty.xaml.cs

@@ -47,8 +47,8 @@ namespace PDF_Office.Views.PropertyPanel.AnnotPanel
                         var annot = item as SquareAnnotArgs;
                         if (annot != null)
                         {
-                            cusColor.SetSelectedColor(annot.LineColor);
-                            cusFillColor.SetSelectedColor(annot.BgColor);
+                            cusColor.SelectedColor = annot.LineColor;
+                            cusFillColor.SelectedColor= annot.BgColor;
                             layerFill.SetSliOpacity(annot.Transparency);
                             SharpsBtn_Click(SharpRectBtn, null);
 
@@ -62,8 +62,8 @@ namespace PDF_Office.Views.PropertyPanel.AnnotPanel
                         var annot = item as CircleAnnotArgs;
                         if (annot != null)
                         {
-                            cusColor.SetSelectedColor(annot.LineColor);
-                            cusFillColor.SetSelectedColor(annot.BgColor);
+                            cusColor.SelectedColor=annot.LineColor;
+                            cusFillColor.SelectedColor=annot.BgColor;
                             layerFill.SetSliOpacity(annot.Transparency);
                             SharpsBtn_Click(SharpCircleBtn, null);
 
@@ -77,8 +77,8 @@ namespace PDF_Office.Views.PropertyPanel.AnnotPanel
                         var annot = item as LineAnnotArgs;
                         if (annot != null)
                         {
-                            cusColor.SetSelectedColor(annot.LineColor);
-                            cusFillColor.SetSelectedColor(annot.LineColor);
+                            cusColor.SelectedColor=annot.LineColor;
+                            cusFillColor.SelectedColor=annot.LineColor;
                             layerFill.SetSliOpacity(annot.Transparency);
 
                             if (annot.TailLineType == C_LINE_TYPE.LINETYPE_ARROW && annot.HeadLineType == C_LINE_TYPE.LINETYPE_NONE)

Разлика између датотеке није приказан због своје велике величине
+ 64 - 40
PDF Office/Views/PropertyPanel/AnnotPanel/StampAnnotProperty.xaml


+ 3 - 3
PDF Office/Views/PropertyPanel/AnnotPanel/TextAnnotProperty.xaml.cs

@@ -44,7 +44,7 @@ namespace PDF_Office.Views.PropertyPanel.AnnotPanel
                         var annot = item as TextHighlightAnnotArgs;
                         if (annot != null)
                         {
-                            cusColor.SetSelectedColor(annot.Color);
+                            cusColor.SelectedColor=annot.Color;
                             SlidOpacity.SetSliOpacity(annot.Transparency);
                         }
                         break;
@@ -55,7 +55,7 @@ namespace PDF_Office.Views.PropertyPanel.AnnotPanel
                         var annot = item as TextUnderlineAnnotArgs;
                         if (annot != null)
                         {
-                            cusColor.SetSelectedColor(annot.Color);
+                            cusColor.SelectedColor=annot.Color;
                             SlidOpacity.SetSliOpacity(annot.Transparency);
                         }
                         break;
@@ -66,7 +66,7 @@ namespace PDF_Office.Views.PropertyPanel.AnnotPanel
                         var annot = item as TextStrikeoutAnnotArgs;
                         if (annot != null)
                         {
-                            cusColor.SetSelectedColor(annot.Color);
+                            cusColor.SelectedColor=annot.Color;
                             SlidOpacity.SetSliOpacity(annot.Transparency);
                         }
                         break;