Jelajahi Sumber

综合-处理编辑PDF高保真,补充页面编辑打印功能

ZhouJieSheng 2 tahun lalu
induk
melakukan
d5107629ec

+ 4 - 0
PDF Office/App.xaml

@@ -352,6 +352,7 @@
                 <Setter Property="Foreground" Value="{StaticResource color.sys.text.neutral.lv1}" />
                 <Setter Property="BorderThickness" Value="0" />
                 <Setter Property="Padding" Value="8,0" />
+                <Setter Property="Height" Value="32" />
                 <Setter Property="Template">
                     <Setter.Value>
                         <ControlTemplate TargetType="{x:Type ComboBoxItem}">
@@ -392,6 +393,7 @@
                                     </MultiTrigger.Conditions>
                                     <Setter TargetName="Bd" Property="Panel.Background" Value="{StaticResource color.item-state.sel.bg.lv1}" />
                                     <Setter TargetName="Bd" Property="Border.BorderBrush" Value="#26A0DA" />
+                                    <Setter Property="Foreground" Value="{StaticResource color.sys.text.accent.norm}" />
                                 </MultiTrigger>
                                 <MultiTrigger>
                                     <MultiTrigger.Conditions>
@@ -400,6 +402,7 @@
                                     </MultiTrigger.Conditions>
                                     <Setter TargetName="Bd" Property="Panel.Background" Value="{StaticResource color.item-state.hov.bg}" />
                                     <Setter TargetName="Bd" Property="Border.BorderBrush" Value="#1A477EDE" />
+                                    <Setter Property="Foreground" Value="{StaticResource color.sys.text.accent.norm}" />
                                 </MultiTrigger>
                                 <MultiTrigger>
                                     <MultiTrigger.Conditions>
@@ -409,6 +412,7 @@
                                     </MultiTrigger.Conditions>
                                     <Setter TargetName="Bd" Property="Panel.Background" Value="{StaticResource color.item-state.sel.bg.lv1}" />
                                     <Setter TargetName="Bd" Property="Border.BorderBrush" Value="#DADADA" />
+                                    <Setter Property="Foreground" Value="{StaticResource color.sys.text.accent.norm}" />
                                 </MultiTrigger>
                                 <MultiTrigger>
                                     <MultiTrigger.Conditions>

+ 43 - 30
PDF Office/CustomControl/CompositeControl/CustomComboControl.xaml

@@ -1,24 +1,28 @@
-<UserControl x:Class="PDF_Office.CustomControl.CompositeControl.CustomComboControl"
-             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.CustomControl.CompositeControl"
-             mc:Ignorable="d" 
-             d:DesignHeight="450" d:DesignWidth="800"
-             x:Name="usercontrol"
-             Loaded="UserControl_Loaded"
-             >
+<UserControl
+    x:Class="PDF_Office.CustomControl.CompositeControl.CustomComboControl"
+    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+    xmlns:local="clr-namespace:PDF_Office.CustomControl.CompositeControl"
+    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+    x:Name="usercontrol"
+    d:DesignHeight="450"
+    d:DesignWidth="800"
+    Loaded="UserControl_Loaded"
+    mc:Ignorable="d">
     <UserControl.Resources>
         <ResourceDictionary>
             <ResourceDictionary.MergedDictionaries>
-                <ResourceDictionary Source="../../Styles/SliderStyle.xaml"></ResourceDictionary>
-                <ResourceDictionary Source="../../Styles/CustomBtnStyle.xaml"/>
+                <ResourceDictionary Source="../../Styles/SliderStyle.xaml" />
+                <ResourceDictionary Source="../../Styles/CustomBtnStyle.xaml" />
             </ResourceDictionary.MergedDictionaries>
 
             <DataTemplate x:Key="numberData">
                 <Grid>
-                    <TextBlock Text="{Binding Content}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
+                    <TextBlock
+                        HorizontalAlignment="Center"
+                        VerticalAlignment="Center"
+                        Text="{Binding Content}" />
                 </Grid>
             </DataTemplate>
         </ResourceDictionary>
@@ -26,25 +30,34 @@
     <Grid>
         <Grid>
             <Grid.ColumnDefinitions>
-                <ColumnDefinition Width="*"></ColumnDefinition>
-                <ColumnDefinition Width="auto"></ColumnDefinition>
+                <ColumnDefinition Width="*" />
+                <ColumnDefinition Width="auto" />
             </Grid.ColumnDefinitions>
 
-            <Border  BorderBrush="#E2E3E6"  HorizontalAlignment="Stretch" Height="32" Margin="0,0,11,0"  BorderThickness="0">
+            <Border
+                Height="32"
+                HorizontalAlignment="Stretch"
+                BorderBrush="#E2E3E6"
+                BorderThickness="0">
                 <Grid>
-                    <ComboBox Name="comBox" BorderThickness="1" Padding="10" Background="Transparent" BorderBrush="#FFE2E3E6" 
-                                  MaxDropDownHeight="200"
-                            ItemTemplate="{StaticResource numberData}"
-                              >
-                        <ComboBox.ItemContainerStyle>
-                            <Style TargetType="{x:Type ComboBoxItem}">
-                                <Setter Property="Padding" Value="10 0 0 0"/>
-                            </Style>
-                        </ComboBox.ItemContainerStyle>
-                    </ComboBox>
-                    <TextBox Name="title" Background="White" FontFamily="Segoe UI" FontSize="14"  Height="20" Margin="10,0,35,0" IsReadOnly="True"
-                             BorderThickness="0" VerticalAlignment="Center" TextAlignment="Left" >
-                    </TextBox>
+                    <ComboBox
+                        Name="comBox"
+                        Padding="10"
+                        BorderBrush="#FFE2E3E6"
+                        BorderThickness="1"
+                        ItemTemplate="{StaticResource numberData}"
+                        MaxDropDownHeight="200" />
+                    <TextBox
+                        Name="title"
+                        Height="20"
+                        Margin="10,0,35,0"
+                        VerticalAlignment="Center"
+                        Background="White"
+                        BorderThickness="0"
+                        FontFamily="Segoe UI"
+                        FontSize="14"
+                        IsReadOnly="True"
+                        TextAlignment="Left" />
                 </Grid>
             </Border>
         </Grid>

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

@@ -6,8 +6,8 @@
     xmlns:local="clr-namespace:PDF_Office.CustomControl.CompositeControl"
     xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
     x:Name="usercontrol"
-    d:DesignHeight="450"
-    d:DesignWidth="800"
+    d:DesignHeight="64"
+    d:DesignWidth="228"
     Loaded="UserControl_Loaded"
     mc:Ignorable="d">
     <UserControl.Resources>
@@ -25,6 +25,537 @@
                         Text="{Binding Content}" />
                 </Grid>
             </DataTemplate>
+
+            <Style
+                xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+                xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+                xmlns:s="clr-namespace:System;assembly=mscorlib"
+                x:Key="RoundThumbSlider"
+                TargetType="{x:Type Slider}">
+                <Style.Triggers>
+                    <Trigger Property="Slider.Orientation" Value="Vertical">
+                        <Setter Property="Control.Template">
+                            <Setter.Value>
+                                <ControlTemplate TargetType="{x:Type Slider}">
+                                    <Border
+                                        Name="border"
+                                        Background="{TemplateBinding Panel.Background}"
+                                        BorderBrush="{TemplateBinding Border.BorderBrush}"
+                                        BorderThickness="{TemplateBinding Border.BorderThickness}"
+                                        SnapsToDevicePixels="True">
+                                        <Grid>
+                                            <Grid.ColumnDefinitions>
+                                                <ColumnDefinition Width="Auto" />
+                                                <ColumnDefinition Width="Auto" MinWidth="{TemplateBinding FrameworkElement.MinWidth}" />
+                                                <ColumnDefinition Width="Auto" />
+                                            </Grid.ColumnDefinitions>
+                                            <TickBar
+                                                Name="TopTick"
+                                                Grid.Column="0"
+                                                Width="4"
+                                                Margin="0,0,2,0"
+                                                Fill="{TemplateBinding TextElement.Foreground}"
+                                                Placement="Left"
+                                                Visibility="Collapsed" />
+                                            <TickBar
+                                                Name="BottomTick"
+                                                Grid.Column="2"
+                                                Width="4"
+                                                Margin="2,0,0,0"
+                                                Fill="{TemplateBinding TextElement.Foreground}"
+                                                Placement="Right"
+                                                Visibility="Collapsed" />
+                                            <Border
+                                                Name="TrackBackground"
+                                                Grid.Column="1"
+                                                Width="4"
+                                                Margin="0,5"
+                                                HorizontalAlignment="Center"
+                                                Background="#E7EAEA"
+                                                BorderBrush="#D6D6D6"
+                                                BorderThickness="1">
+                                                <Canvas Margin="-1,-6">
+                                                    <Rectangle
+                                                        Name="PART_SelectionRange"
+                                                        Width="4"
+                                                        Fill="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"
+                                                        Visibility="Hidden" />
+                                                </Canvas>
+                                            </Border>
+                                            <Track Name="PART_Track" Grid.Column="1">
+                                                <Track.DecreaseRepeatButton>
+                                                    <RepeatButton>
+                                                        <RepeatButton.Command>
+                                                            <RoutedCommand />
+                                                        </RepeatButton.Command>
+                                                        <RepeatButton.Style>
+                                                            <Style TargetType="{x:Type RepeatButton}">
+                                                                <Setter Property="FrameworkElement.OverridesDefaultStyle" Value="True" />
+                                                                <Setter Property="Panel.Background" Value="#00FFFFFF" />
+                                                                <Setter Property="UIElement.Focusable" Value="False" />
+                                                                <Setter Property="KeyboardNavigation.IsTabStop" Value="False" />
+                                                                <Setter Property="Control.Template">
+                                                                    <Setter.Value>
+                                                                        <ControlTemplate TargetType="{x:Type RepeatButton}">
+                                                                            <Rectangle
+                                                                                Width="{TemplateBinding FrameworkElement.Width}"
+                                                                                Height="2"
+                                                                                Fill="{TemplateBinding Panel.Background}" />
+                                                                        </ControlTemplate>
+                                                                    </Setter.Value>
+                                                                </Setter>
+                                                            </Style>
+                                                        </RepeatButton.Style>
+                                                    </RepeatButton>
+                                                </Track.DecreaseRepeatButton>
+                                                <Track.Thumb>
+                                                    <Thumb
+                                                        Name="Thumb"
+                                                        Width="18"
+                                                        Height="11"
+                                                        VerticalAlignment="Top"
+                                                        Focusable="False"
+                                                        OverridesDefaultStyle="True">
+                                                        <Thumb.Template>
+                                                            <ControlTemplate TargetType="{x:Type Thumb}">
+                                                                <Grid
+                                                                    HorizontalAlignment="Center"
+                                                                    VerticalAlignment="Center"
+                                                                    UseLayoutRounding="True">
+                                                                    <Path
+                                                                        Name="grip"
+                                                                        VerticalAlignment="Center"
+                                                                        Fill="#477EDE"
+                                                                        SnapsToDevicePixels="True"
+                                                                        Stretch="Fill"
+                                                                        Stroke="#477EDE"
+                                                                        StrokeThickness="1"
+                                                                        UseLayoutRounding="True">
+                                                                        <Path.Data>
+                                                                            <RectangleGeometry
+                                                                                RadiusX="4"
+                                                                                RadiusY="4"
+                                                                                Rect="0,0,8,16" />
+                                                                        </Path.Data>
+                                                                    </Path>
+                                                                </Grid>
+                                                                <ControlTemplate.Triggers>
+                                                                    <Trigger Property="UIElement.IsMouseOver" Value="True">
+                                                                        <Setter TargetName="grip" Property="Shape.Fill" Value="#477EDE" />
+                                                                        <Setter TargetName="grip" Property="Shape.Stroke" Value="#477EDE" />
+                                                                    </Trigger>
+                                                                    <Trigger Property="Thumb.IsDragging" Value="True">
+                                                                        <Setter TargetName="grip" Property="Shape.Fill" Value="#477EDE" />
+                                                                        <Setter TargetName="grip" Property="Shape.Stroke" Value="#477EDE" />
+                                                                    </Trigger>
+                                                                    <Trigger Property="UIElement.IsEnabled" Value="False">
+                                                                        <Setter TargetName="grip" Property="Shape.Fill" Value="#477EDE" />
+                                                                        <Setter TargetName="grip" Property="Shape.Stroke" Value="#477EDE" />
+                                                                    </Trigger>
+                                                                </ControlTemplate.Triggers>
+                                                            </ControlTemplate>
+                                                        </Thumb.Template>
+                                                    </Thumb>
+                                                </Track.Thumb>
+                                                <Track.IncreaseRepeatButton>
+                                                    <RepeatButton>
+                                                        <RepeatButton.Command>
+                                                            <RoutedCommand />
+                                                        </RepeatButton.Command>
+                                                        <RepeatButton.Style>
+                                                            <Style TargetType="{x:Type RepeatButton}">
+                                                                <Setter Property="FrameworkElement.OverridesDefaultStyle" Value="True" />
+                                                                <Setter Property="Panel.Background" Value="#00FFFFFF" />
+                                                                <Setter Property="UIElement.Focusable" Value="False" />
+                                                                <Setter Property="KeyboardNavigation.IsTabStop" Value="False" />
+                                                                <Setter Property="Control.Template">
+                                                                    <Setter.Value>
+                                                                        <ControlTemplate TargetType="{x:Type RepeatButton}">
+                                                                            <Rectangle
+                                                                                Width="{TemplateBinding FrameworkElement.Width}"
+                                                                                Height="2"
+                                                                                Fill="{TemplateBinding Panel.Background}" />
+                                                                        </ControlTemplate>
+                                                                    </Setter.Value>
+                                                                </Setter>
+                                                            </Style>
+                                                        </RepeatButton.Style>
+                                                    </RepeatButton>
+                                                </Track.IncreaseRepeatButton>
+                                            </Track>
+                                        </Grid>
+                                    </Border>
+                                    <ControlTemplate.Triggers>
+                                        <Trigger Property="Slider.TickPlacement" Value="TopLeft">
+                                            <Setter TargetName="TopTick" Property="UIElement.Visibility" Value="Visible" />
+                                            <Setter TargetName="Thumb" Property="Control.Template">
+                                                <Setter.Value>
+                                                    <ControlTemplate TargetType="{x:Type Thumb}">
+                                                        <Grid
+                                                            HorizontalAlignment="Center"
+                                                            VerticalAlignment="Center"
+                                                            UseLayoutRounding="True">
+                                                            <Path
+                                                                Name="grip"
+                                                                VerticalAlignment="Center"
+                                                                Fill="#477EDE"
+                                                                SnapsToDevicePixels="True"
+                                                                Stretch="Fill"
+                                                                Stroke="#477EDE"
+                                                                StrokeThickness="1"
+                                                                UseLayoutRounding="True">
+                                                                <Path.Data>
+                                                                    <RectangleGeometry
+                                                                        RadiusX="4"
+                                                                        RadiusY="4"
+                                                                        Rect="0,0,8,16" />
+                                                                </Path.Data>
+                                                            </Path>
+                                                        </Grid>
+                                                        <ControlTemplate.Triggers>
+                                                            <Trigger Property="UIElement.IsMouseOver" Value="True">
+                                                                <Setter TargetName="grip" Property="Shape.Fill" Value="#477EDE" />
+                                                                <Setter TargetName="grip" Property="Shape.Stroke" Value="#477EDE" />
+                                                            </Trigger>
+                                                            <Trigger Property="Thumb.IsDragging" Value="True">
+                                                                <Setter TargetName="grip" Property="Shape.Fill" Value="#477EDE" />
+                                                                <Setter TargetName="grip" Property="Shape.Stroke" Value="#477EDE" />
+                                                            </Trigger>
+                                                            <Trigger Property="UIElement.IsEnabled" Value="False">
+                                                                <Setter TargetName="grip" Property="Shape.Fill" Value="#477EDE" />
+                                                                <Setter TargetName="grip" Property="Shape.Stroke" Value="#477EDE" />
+                                                            </Trigger>
+                                                        </ControlTemplate.Triggers>
+                                                    </ControlTemplate>
+                                                </Setter.Value>
+                                            </Setter>
+                                            <Setter TargetName="TrackBackground" Property="FrameworkElement.Margin" Value="2,5,0,5" />
+                                        </Trigger>
+                                        <Trigger Property="Slider.TickPlacement" Value="BottomRight">
+                                            <Setter TargetName="BottomTick" Property="UIElement.Visibility" Value="Visible" />
+                                            <Setter TargetName="Thumb" Property="Control.Template">
+                                                <Setter.Value>
+                                                    <ControlTemplate TargetType="{x:Type Thumb}">
+                                                        <Grid
+                                                            HorizontalAlignment="Center"
+                                                            VerticalAlignment="Center"
+                                                            UseLayoutRounding="True">
+                                                            <Path
+                                                                Name="grip"
+                                                                VerticalAlignment="Center"
+                                                                Fill="#477EDE"
+                                                                SnapsToDevicePixels="True"
+                                                                Stretch="Fill"
+                                                                Stroke="#477EDE"
+                                                                StrokeThickness="1"
+                                                                UseLayoutRounding="True">
+                                                                <Path.Data>
+                                                                    <RectangleGeometry
+                                                                        RadiusX="4"
+                                                                        RadiusY="4"
+                                                                        Rect="0,0,8,16" />
+                                                                </Path.Data>
+                                                            </Path>
+                                                        </Grid>
+                                                        <ControlTemplate.Triggers>
+                                                            <Trigger Property="UIElement.IsMouseOver" Value="True">
+                                                                <Setter TargetName="grip" Property="Shape.Fill" Value="#477EDE" />
+                                                                <Setter TargetName="grip" Property="Shape.Stroke" Value="#477EDE" />
+                                                            </Trigger>
+                                                            <Trigger Property="Thumb.IsDragging" Value="True">
+                                                                <Setter TargetName="grip" Property="Shape.Fill" Value="#477EDE" />
+                                                                <Setter TargetName="grip" Property="Shape.Stroke" Value="#477EDE" />
+                                                            </Trigger>
+                                                            <Trigger Property="UIElement.IsEnabled" Value="False">
+                                                                <Setter TargetName="grip" Property="Shape.Fill" Value="#477EDE" />
+                                                                <Setter TargetName="grip" Property="Shape.Stroke" Value="#477EDE" />
+                                                            </Trigger>
+                                                        </ControlTemplate.Triggers>
+                                                    </ControlTemplate>
+                                                </Setter.Value>
+                                            </Setter>
+                                            <Setter TargetName="TrackBackground" Property="FrameworkElement.Margin" Value="0,5,2,5" />
+                                        </Trigger>
+                                        <Trigger Property="Slider.TickPlacement" Value="Both">
+                                            <Setter TargetName="TopTick" Property="UIElement.Visibility" Value="Visible" />
+                                            <Setter TargetName="BottomTick" Property="UIElement.Visibility" Value="Visible" />
+                                        </Trigger>
+                                        <Trigger Property="Slider.IsSelectionRangeEnabled" Value="True">
+                                            <Setter TargetName="PART_SelectionRange" Property="UIElement.Visibility" Value="Visible" />
+                                        </Trigger>
+                                        <Trigger Property="UIElement.IsKeyboardFocused" Value="True">
+                                            <Setter TargetName="Thumb" Property="TextElement.Foreground" Value="#0000FF" />
+                                        </Trigger>
+                                    </ControlTemplate.Triggers>
+                                </ControlTemplate>
+                            </Setter.Value>
+                        </Setter>
+                    </Trigger>
+                </Style.Triggers>
+                <Setter Property="Stylus.IsPressAndHoldEnabled" Value="False" />
+                <Setter Property="Panel.Background" Value="#00FFFFFF" />
+                <Setter Property="Border.BorderBrush" Value="#00FFFFFF" />
+                <Setter Property="TextElement.Foreground" Value="#E5E5E5" />
+                <Setter Property="Control.Template">
+                    <Setter.Value>
+                        <ControlTemplate TargetType="{x:Type Slider}">
+                            <Border
+                                Name="border"
+                                Background="{TemplateBinding Panel.Background}"
+                                BorderBrush="{TemplateBinding Border.BorderBrush}"
+                                BorderThickness="{TemplateBinding Border.BorderThickness}"
+                                SnapsToDevicePixels="True">
+                                <Grid>
+                                    <Grid.RowDefinitions>
+                                        <RowDefinition Height="Auto" />
+                                        <RowDefinition Height="Auto" MinHeight="{TemplateBinding FrameworkElement.MinHeight}" />
+                                        <RowDefinition Height="Auto" />
+                                    </Grid.RowDefinitions>
+                                    <TickBar
+                                        Name="TopTick"
+                                        Grid.Row="0"
+                                        Height="4"
+                                        Margin="0,2,0,0"
+                                        Fill="{TemplateBinding TextElement.Foreground}"
+                                        Placement="Top"
+                                        Visibility="Collapsed" />
+                                    <TickBar
+                                        Name="BottomTick"
+                                        Grid.Row="2"
+                                        Height="4"
+                                        Margin="0,0,0,2"
+                                        Fill="{TemplateBinding TextElement.Foreground}"
+                                        Placement="Bottom"
+                                        Visibility="Collapsed" />
+                                    <Border
+                                        Name="TrackBackground"
+                                        Grid.Row="1"
+                                        Height="4"
+                                        Margin="5,0"
+                                        VerticalAlignment="Center"
+                                        Background="#FFE2E3E6"
+                                        BorderBrush="#D6D6D6"
+                                        BorderThickness="0">
+                                        <Canvas Margin="-6,-1">
+                                            <Rectangle
+                                                Name="PART_SelectionRange"
+                                                Height="4"
+                                                Fill="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"
+                                                Visibility="Hidden" />
+                                        </Canvas>
+                                    </Border>
+                                    <Track Name="PART_Track" Grid.Row="1">
+                                        <Track.DecreaseRepeatButton>
+                                            <RepeatButton>
+                                                <RepeatButton.Command>
+                                                    <RoutedCommand />
+                                                </RepeatButton.Command>
+                                                <RepeatButton.Style>
+                                                    <Style TargetType="{x:Type RepeatButton}">
+                                                        <Setter Property="FrameworkElement.OverridesDefaultStyle" Value="True" />
+                                                        <Setter Property="Panel.Background" Value="#00FFFFFF" />
+                                                        <Setter Property="UIElement.Focusable" Value="False" />
+                                                        <Setter Property="KeyboardNavigation.IsTabStop" Value="False" />
+                                                        <Setter Property="Control.Template">
+                                                            <Setter.Value>
+                                                                <ControlTemplate TargetType="{x:Type RepeatButton}">
+                                                                    <Rectangle
+                                                                        Width="{TemplateBinding FrameworkElement.Width}"
+                                                                        Height="{TemplateBinding FrameworkElement.Height}"
+                                                                        Fill="{TemplateBinding Panel.Background}" />
+                                                                </ControlTemplate>
+                                                            </Setter.Value>
+                                                        </Setter>
+                                                    </Style>
+                                                </RepeatButton.Style>
+                                            </RepeatButton>
+                                        </Track.DecreaseRepeatButton>
+                                        <Track.Thumb>
+                                            <Thumb
+                                                Name="Thumb"
+                                                Width="14"
+                                                Height="14"
+                                                VerticalAlignment="Center"
+                                                Focusable="False"
+                                                OverridesDefaultStyle="True">
+                                                <Thumb.Template>
+                                                    <ControlTemplate TargetType="{x:Type Thumb}">
+                                                        <Grid
+                                                            HorizontalAlignment="Center"
+                                                            VerticalAlignment="Center"
+                                                            UseLayoutRounding="True">
+                                                            <Path
+                                                                Name="grip"
+                                                                VerticalAlignment="Center"
+                                                                Effect="{StaticResource shadow.neutral.s}"
+                                                                Fill="{StaticResource color.slider.track-filled.norm}"
+                                                                SnapsToDevicePixels="True"
+                                                                Stretch="Fill"
+                                                                Stroke="{StaticResource color.slider.knob.border}"
+                                                                StrokeThickness="2"
+                                                                UseLayoutRounding="True">
+                                                                <Path.Data>
+                                                                    <EllipseGeometry
+                                                                        Center="14,14"
+                                                                        RadiusX="7"
+                                                                        RadiusY="7" />
+                                                                </Path.Data>
+                                                            </Path>
+                                                        </Grid>
+                                                        <ControlTemplate.Triggers>
+                                                            <!--<Trigger Property="UIElement.IsMouseOver" Value="True">
+                                                                <Setter TargetName="grip" Property="Shape.Fill" Value="#477EDE" />
+                                                                <Setter TargetName="grip" Property="Shape.Stroke" Value="#477EDE" />
+                                                            </Trigger>
+                                                            <Trigger Property="Thumb.IsDragging" Value="True">
+                                                                <Setter TargetName="grip" Property="Shape.Fill" Value="#477EDE" />
+                                                                <Setter TargetName="grip" Property="Shape.Stroke" Value="#477EDE" />
+                                                            </Trigger>
+                                                            <Trigger Property="UIElement.IsEnabled" Value="False">
+                                                                <Setter TargetName="grip" Property="Shape.Fill" Value="#477EDE" />
+                                                                <Setter TargetName="grip" Property="Shape.Stroke" Value="#477EDE" />
+                                                            </Trigger>-->
+                                                        </ControlTemplate.Triggers>
+                                                    </ControlTemplate>
+                                                </Thumb.Template>
+                                            </Thumb>
+                                        </Track.Thumb>
+                                        <Track.IncreaseRepeatButton>
+                                            <RepeatButton>
+                                                <RepeatButton.Command>
+                                                    <RoutedCommand />
+                                                </RepeatButton.Command>
+                                                <RepeatButton.Style>
+                                                    <Style TargetType="{x:Type RepeatButton}">
+                                                        <Setter Property="FrameworkElement.OverridesDefaultStyle" Value="True" />
+                                                        <Setter Property="Panel.Background" Value="#00FFFFFF" />
+                                                        <Setter Property="UIElement.Focusable" Value="False" />
+                                                        <Setter Property="KeyboardNavigation.IsTabStop" Value="False" />
+                                                        <Setter Property="Control.Template">
+                                                            <Setter.Value>
+                                                                <ControlTemplate TargetType="{x:Type RepeatButton}">
+                                                                    <Rectangle
+                                                                        Width="{TemplateBinding FrameworkElement.Width}"
+                                                                        Height="{TemplateBinding FrameworkElement.Height}"
+                                                                        Fill="{TemplateBinding Panel.Background}" />
+                                                                </ControlTemplate>
+                                                            </Setter.Value>
+                                                        </Setter>
+                                                    </Style>
+                                                </RepeatButton.Style>
+                                            </RepeatButton>
+                                        </Track.IncreaseRepeatButton>
+                                    </Track>
+                                </Grid>
+                            </Border>
+                            <ControlTemplate.Triggers>
+                                <Trigger Property="Slider.TickPlacement" Value="TopLeft">
+                                    <Setter TargetName="TopTick" Property="UIElement.Visibility" Value="Visible" />
+                                    <Setter TargetName="Thumb" Property="Control.Template">
+                                        <Setter.Value>
+                                            <ControlTemplate TargetType="{x:Type Thumb}">
+                                                <Grid
+                                                    HorizontalAlignment="Center"
+                                                    VerticalAlignment="Center"
+                                                    UseLayoutRounding="True">
+                                                    <Path
+                                                        Name="grip"
+                                                        VerticalAlignment="Center"
+                                                        Fill="#477EDE"
+                                                        SnapsToDevicePixels="True"
+                                                        Stretch="Fill"
+                                                        Stroke="#477EDE"
+                                                        StrokeThickness="1"
+                                                        UseLayoutRounding="True">
+                                                        <Path.Data>
+                                                            <RectangleGeometry
+                                                                RadiusX="4"
+                                                                RadiusY="4"
+                                                                Rect="0,0,8,16" />
+                                                        </Path.Data>
+                                                    </Path>
+                                                </Grid>
+                                                <ControlTemplate.Triggers>
+                                                    <Trigger Property="UIElement.IsMouseOver" Value="True">
+                                                        <Setter TargetName="grip" Property="Shape.Fill" Value="#477EDE" />
+                                                        <Setter TargetName="grip" Property="Shape.Stroke" Value="#477EDE" />
+                                                    </Trigger>
+                                                    <Trigger Property="Thumb.IsDragging" Value="True">
+                                                        <Setter TargetName="grip" Property="Shape.Fill" Value="#477EDE" />
+                                                        <Setter TargetName="grip" Property="Shape.Stroke" Value="#477EDE" />
+                                                    </Trigger>
+                                                    <Trigger Property="UIElement.IsEnabled" Value="False">
+                                                        <Setter TargetName="grip" Property="Shape.Fill" Value="#477EDE" />
+                                                        <Setter TargetName="grip" Property="Shape.Stroke" Value="#477EDE" />
+                                                    </Trigger>
+                                                </ControlTemplate.Triggers>
+                                            </ControlTemplate>
+                                        </Setter.Value>
+                                    </Setter>
+                                    <Setter TargetName="TrackBackground" Property="FrameworkElement.Margin" Value="5,2,5,0" />
+                                </Trigger>
+                                <Trigger Property="Slider.TickPlacement" Value="BottomRight">
+                                    <Setter TargetName="BottomTick" Property="UIElement.Visibility" Value="Visible" />
+                                    <Setter TargetName="Thumb" Property="Control.Template">
+                                        <Setter.Value>
+                                            <ControlTemplate TargetType="{x:Type Thumb}">
+                                                <Grid
+                                                    HorizontalAlignment="Center"
+                                                    VerticalAlignment="Center"
+                                                    UseLayoutRounding="True">
+                                                    <Path
+                                                        Name="grip"
+                                                        VerticalAlignment="Center"
+                                                        Fill="#477EDE"
+                                                        SnapsToDevicePixels="True"
+                                                        Stretch="Fill"
+                                                        Stroke="#477EDE"
+                                                        StrokeThickness="1"
+                                                        UseLayoutRounding="True">
+                                                        <Path.Data>
+                                                            <RectangleGeometry
+                                                                RadiusX="4"
+                                                                RadiusY="4"
+                                                                Rect="0,0,8,16" />
+                                                        </Path.Data>
+                                                    </Path>
+                                                </Grid>
+                                                <ControlTemplate.Triggers>
+                                                    <Trigger Property="UIElement.IsMouseOver" Value="True">
+                                                        <Setter TargetName="grip" Property="Shape.Fill" Value="#477EDE" />
+                                                        <Setter TargetName="grip" Property="Shape.Stroke" Value="#477EDE" />
+                                                    </Trigger>
+                                                    <Trigger Property="Thumb.IsDragging" Value="True">
+                                                        <Setter TargetName="grip" Property="Shape.Fill" Value="#477EDE" />
+                                                        <Setter TargetName="grip" Property="Shape.Stroke" Value="#477EDE" />
+                                                    </Trigger>
+                                                    <Trigger Property="UIElement.IsEnabled" Value="False">
+                                                        <Setter TargetName="grip" Property="Shape.Fill" Value="#477EDE" />
+                                                        <Setter TargetName="grip" Property="Shape.Stroke" Value="#477EDE" />
+                                                    </Trigger>
+                                                </ControlTemplate.Triggers>
+                                            </ControlTemplate>
+                                        </Setter.Value>
+                                    </Setter>
+                                    <Setter TargetName="TrackBackground" Property="FrameworkElement.Margin" Value="5,0,5,2" />
+                                </Trigger>
+                                <Trigger Property="Slider.TickPlacement" Value="Both">
+                                    <Setter TargetName="TopTick" Property="UIElement.Visibility" Value="Visible" />
+                                    <Setter TargetName="BottomTick" Property="UIElement.Visibility" Value="Visible" />
+                                </Trigger>
+                                <Trigger Property="Slider.IsSelectionRangeEnabled" Value="True">
+                                    <Setter TargetName="PART_SelectionRange" Property="UIElement.Visibility" Value="Visible" />
+                                </Trigger>
+                                <Trigger Property="UIElement.IsKeyboardFocused" Value="True">
+                                    <Setter TargetName="Thumb" Property="TextElement.Foreground" Value="#0000FF" />
+                                </Trigger>
+                            </ControlTemplate.Triggers>
+                        </ControlTemplate>
+                    </Setter.Value>
+                </Setter>
+                <Setter Property="SelectionStart" Value="{Binding Minimum, RelativeSource={RelativeSource Self}}" />
+                <Setter Property="SelectionEnd" Value="{Binding Value, RelativeSource={RelativeSource Self}}" />
+            </Style>
         </ResourceDictionary>
     </UserControl.Resources>
     <Grid>
@@ -34,7 +565,7 @@
         </Grid.RowDefinitions>
         <TextBlock
             x:Name="thicknessText"
-            Margin="12,14,0,0"
+            Margin="0,0,0,10"
             FontFamily="Segoe UI Semibold"
             FontSize="14"
             FontWeight="SemiBold"
@@ -50,24 +581,27 @@
 
             <Slider
                 Name="ThicknessSlider"
-                Width="148"
-                Margin="12,0,0,0"
+                Width="146"
                 VerticalAlignment="Center"
                 IsMoveToPointEnabled="True"
                 IsSelectionRangeEnabled="True"
                 IsSnapToTickEnabled="True"
                 Maximum="24"
                 Minimum="0"
-                Style="{StaticResource RoundThumbSlider}"
+                Style="{DynamicResource RoundThumbSlider}"
                 TickFrequency="1"
                 Value="{Binding ElementName=usercontrol, Path=Value}">
                 <Slider.Resources>
-                    <SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="#477EDE" />
-                    <SolidColorBrush x:Key="{x:Static SystemColors.ControlDarkDarkBrushKey}" Color="#E2E3E6" />
+                    <SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="#1770F4" />
+                    <SolidColorBrush x:Key="{x:Static SystemColors.ControlDarkDarkBrushKey}" Color="#CED0D4" />
                 </Slider.Resources>
             </Slider>
-            <local:CustomComboControl x:Name="combox" Grid.Column="1" Width="80" Height="32"  />
-   
+            <local:CustomComboControl
+                x:Name="combox"
+                Grid.Column="1"
+                Width="80"
+                Height="32" />
+
         </Grid>
     </Grid>
 

+ 175 - 138
PDF Office/CustomControl/Form/LayoutAglinContent.xaml

@@ -1,16 +1,18 @@
-<UserControl x:Class="PDF_Office.CustomControl.Form.LayoutAglinContent"
-             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:i="http://schemas.microsoft.com/xaml/behaviors"
-             xmlns:Convert="clr-namespace:PDF_Office.DataConvert"
-             xmlns:prism="http://prismlibrary.com/"
-             prism:ViewModelLocator.AutoWireViewModel="True"
-             xmlns:local="clr-namespace:PDF_Office.CustomControl.Form"
-             mc:Ignorable="d" 
-             x:Name="usercontrol"
-             d:DesignHeight="450" d:DesignWidth="800">
+<UserControl
+    x:Class="PDF_Office.CustomControl.Form.LayoutAglinContent"
+    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:d="http://schemas.microsoft.com/expression/blend/2008"
+    xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
+    xmlns:local="clr-namespace:PDF_Office.CustomControl.Form"
+    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+    xmlns:prism="http://prismlibrary.com/"
+    x:Name="usercontrol"
+    d:DesignHeight="450"
+    d:DesignWidth="800"
+    prism:ViewModelLocator.AutoWireViewModel="True"
+    mc:Ignorable="d">
     <UserControl.Resources>
         <ResourceDictionary>
             <ResourceDictionary.MergedDictionaries>
@@ -21,202 +23,237 @@
         </ResourceDictionary>
     </UserControl.Resources>
     <Grid
-            x:Name="LayoutAlignGrid"
-            Grid.Row="1"
-            Width="150"
-            Margin="0,10,0,0"
-            HorizontalAlignment="Left">
+        x:Name="LayoutAlignGrid"
+        Grid.Row="1"
+        HorizontalAlignment="Left">
         <Grid.RowDefinitions>
-            <RowDefinition Height="*" />
-            <RowDefinition Height="*" />
+            <RowDefinition Height="auto" />
+            <RowDefinition Height="auto" />
         </Grid.RowDefinitions>
 
         <Grid.ColumnDefinitions>
-            <ColumnDefinition Width="*" />
-            <ColumnDefinition Width="*" />
-            <ColumnDefinition Width="*" />
-            <ColumnDefinition Width="*" />
+            <ColumnDefinition Width="auto" />
+            <ColumnDefinition Width="auto" />
+            <ColumnDefinition Width="auto" />
+            <ColumnDefinition Width="auto" />
         </Grid.ColumnDefinitions>
 
         <RadioButton
-                x:Name="LayoutAlignLeft"
-                Grid.Row="0"
-                Grid.Column="0"
-                Width="32"
-                Height="32"
-                VerticalContentAlignment="Center"
-                Background="Transparent"
-                Foreground="#616469"
-                GroupName="ImgAlign"
-                Checked="Align_Checked"
-                IsEnabled="{Binding ElementName=usercontrol,Path=IsLayoutAlign}"
-                Style="{DynamicResource GreyBgRadioBtnStyle}"
-                Tag="AlignLeft">
+            x:Name="LayoutAlignLeft"
+            Grid.Row="0"
+            Grid.Column="0"
+            Width="32"
+            Height="32"
+            Margin="0,0,8,8"
+            VerticalContentAlignment="Center"
+            Background="Transparent"
+            Checked="Align_Checked"
+            Foreground="#616469"
+            GroupName="ImgAlign"
+            IsEnabled="{Binding ElementName=usercontrol, Path=IsLayoutAlign}"
+            Style="{StaticResource GreyBgRadioBtnStyle}"
+            Tag="AlignLeft">
             <RadioButton.Content>
                 <Path
-                        Margin="5,0,0,0"
-                        Data="M2.01367 15V1H3.51367V15H2.01367ZM5 4H11V7H5V4ZM14 9H5V12H14V9Z"
-                        Fill="{Binding ElementName=LayoutAlignLeft, Path=Foreground}" />
+                    Margin="5,0,0,0"
+                    Data="M2.01367 15V1H3.51367V15H2.01367ZM5 4H11V7H5V4ZM14 9H5V12H14V9Z"
+                    Fill="{Binding ElementName=LayoutAlignLeft, Path=Foreground}" />
             </RadioButton.Content>
         </RadioButton>
 
         <RadioButton
-                x:Name="LayoutAlignHorizonCenter"
-                Grid.Row="0"
-                Grid.Column="1"
-                Width="32"
-                Height="32"
-                VerticalContentAlignment="Center"
-                Background="Transparent"
-                Foreground="#616469"
-                GroupName="ImgAlign"
-                Checked="Align_Checked"
-                IsEnabled="{Binding ElementName=usercontrol,Path=IsLayoutAlign}"
-                Style="{DynamicResource GreyBgRadioBtnStyle}"
-                Tag="AlignHorizonCenter">
+            x:Name="LayoutAlignHorizonCenter"
+            Grid.Row="0"
+            Grid.Column="1"
+            Width="32"
+            Height="32"
+            Margin="0,0,8,8"
+            VerticalContentAlignment="Center"
+            Background="Transparent"
+            Checked="Align_Checked"
+            Foreground="#616469"
+            GroupName="ImgAlign"
+            IsEnabled="{Binding ElementName=usercontrol, Path=IsLayoutAlign}"
+            Style="{DynamicResource GreyBgRadioBtnStyle}"
+            Tag="AlignHorizonCenter">
             <RadioButton.Content>
                 <Path
-                        Margin="5,0,0,0"
-                        Data="M8.75 7L8.75 9L12 9L12 12L8.75 12L8.75 15L7.25 15L7.25 12L4 12L4 9L7.25 9L7.25 7L2 7L2 4L7.25 4L7.25 0.999999L8.75 1L8.75 4L14 4L14 7L8.75 7Z"
-                        Fill="{Binding ElementName=LayoutAlignHorizonCenter, Path=Foreground}" />
+                    Margin="5,0,0,0"
+                    Data="M8.75 7L8.75 9L12 9L12 12L8.75 12L8.75 15L7.25 15L7.25 12L4 12L4 9L7.25 9L7.25 7L2 7L2 4L7.25 4L7.25 0.999999L8.75 1L8.75 4L14 4L14 7L8.75 7Z"
+                    Fill="{Binding ElementName=LayoutAlignHorizonCenter, Path=Foreground}" />
             </RadioButton.Content>
         </RadioButton>
 
         <RadioButton
-                x:Name="LayoutAlignRight"
-                Grid.Row="0"
-                Grid.Column="2"
-                Width="32"
-                Height="32"
-                VerticalContentAlignment="Center"
-                Background="Transparent"
-                Foreground="#616469"
-                GroupName="ImgAlign"
-                Checked="Align_Checked"
-                IsEnabled="{Binding ElementName=usercontrol,Path=IsLayoutAlign}"
-                Style="{DynamicResource GreyBgRadioBtnStyle}"
-                Tag="AlignRight">
+            x:Name="LayoutAlignRight"
+            Grid.Row="0"
+            Grid.Column="2"
+            Width="32"
+            Height="32"
+            Margin="0,0,8,8"
+            VerticalContentAlignment="Center"
+            Background="Transparent"
+            Checked="Align_Checked"
+            Foreground="#616469"
+            GroupName="ImgAlign"
+            IsEnabled="{Binding ElementName=usercontrol, Path=IsLayoutAlign}"
+            Style="{DynamicResource GreyBgRadioBtnStyle}"
+            Tag="AlignRight">
             <RadioButton.Content>
                 <Path
-                        Margin="5,0,0,0"
-                        Data="M14 1L14 15L12.5 15L12.5 1L14 1ZM11 12L2 12L2 9L11 9L11 12ZM4 7L11 7L11 4L4 4L4 7Z"
-                        Fill="{Binding ElementName=LayoutAlignRight, Path=Foreground}" />
+                    Margin="5,0,0,0"
+                    Data="M14 1L14 15L12.5 15L12.5 1L14 1ZM11 12L2 12L2 9L11 9L11 12ZM4 7L11 7L11 4L4 4L4 7Z"
+                    Fill="{Binding ElementName=LayoutAlignRight, Path=Foreground}" />
             </RadioButton.Content>
         </RadioButton>
 
-        <RadioButton
+        <StackPanel
+            Grid.Row="0"
+            Grid.Column="3"
+            Orientation="Horizontal">
+            <Separator
+                Grid.Row="0"
+                Grid.Column="3"
+                Width="1"
+                Height="16"
+                Margin="0,8,0,8"
+                HorizontalAlignment="Left"
+                VerticalAlignment="Top"
+                Background="{StaticResource color.sys.layout.divider}"
+                Style="{StaticResource VerticalSeparatorStyle}" />
+            <RadioButton
                 x:Name="LayoutAlignDistributeHorizontal"
                 Grid.Row="0"
                 Grid.Column="3"
                 Width="32"
                 Height="32"
+                Margin="8,0,8,8"
                 VerticalContentAlignment="Center"
                 Background="Transparent"
+                Checked="Align_Checked"
                 Foreground="#616469"
                 GroupName="ImgAlign"
-                Checked="Align_Checked"
-                IsEnabled="{Binding ElementName=usercontrol,Path=IsLayoutAvgAlign}"
+                IsEnabled="{Binding ElementName=usercontrol, Path=IsLayoutAvgAlign}"
                 Style="{DynamicResource GreyBgRadioBtnStyle}"
                 Tag="DistributeHorizontal">
-            <RadioButton.Content>
-                <Path
+                <RadioButton.Content>
+                    <Path
                         Margin="5,0,0,0"
                         Data="M15 12.5L1 12.5L1 14L15 14L15 12.5ZM12 9.5L4 9.5L4 6.5L12 6.5L12 9.5ZM1 2L15 2L15 3.5L1 3.5L1 2Z"
                         Fill="{Binding ElementName=LayoutAlignDistributeHorizontal, Path=Foreground}" />
-            </RadioButton.Content>
-           
-        </RadioButton>
+                </RadioButton.Content>
+
+            </RadioButton>
+        </StackPanel>
 
         <RadioButton
-                x:Name="LayoutAlignTop"
-                Grid.Row="1"
-                Grid.Column="0"
-                Width="32"
-                Height="32"
-                VerticalContentAlignment="Center"
-                Background="Transparent"
-                Foreground="#616469"
-                GroupName="ImgAlign"
-                Checked="Align_Checked"
-                IsEnabled="{Binding ElementName=usercontrol,Path=IsLayoutAlign}"
-                Style="{DynamicResource GreyBgRadioBtnStyle}"
-                Tag="AlignTop">
+            x:Name="LayoutAlignTop"
+            Grid.Row="1"
+            Grid.Column="0"
+            Width="32"
+            Height="32"
+            Margin="0,0,8,8"
+            HorizontalAlignment="Left"
+            VerticalContentAlignment="Center"
+            Background="Transparent"
+            Checked="Align_Checked"
+            Foreground="#616469"
+            GroupName="ImgAlign"
+            IsEnabled="{Binding ElementName=usercontrol, Path=IsLayoutAlign}"
+            Style="{DynamicResource GreyBgRadioBtnStyle}"
+            Tag="AlignTop">
             <RadioButton.Content>
                 <Path
-                        Margin="5,0,0,0"
-                        Data="M15 2L1 2L1 3.5L15 3.5L15 2ZM12 5L12 11L9 11L9 5L12 5ZM7 5L7 14L4 14L4 5L7 5Z"
-                        Fill="{Binding ElementName=LayoutAlignTop, Path=Foreground}" />
+                    Margin="5,0,0,0"
+                    Data="M15 2L1 2L1 3.5L15 3.5L15 2ZM12 5L12 11L9 11L9 5L12 5ZM7 5L7 14L4 14L4 5L7 5Z"
+                    Fill="{Binding ElementName=LayoutAlignTop, Path=Foreground}" />
             </RadioButton.Content>
-           
+
         </RadioButton>
 
         <RadioButton
-                x:Name="LayoutAlignVerticalCenter"
-                Grid.Row="1"
-                Grid.Column="1"
-                Width="32"
-                Height="32"
-                VerticalContentAlignment="Center"
-                Background="Transparent"
-                Foreground="#616469"
-                GroupName="ImgAlign"
-                Checked="Align_Checked"
-                IsEnabled="{Binding ElementName=usercontrol,Path=IsLayoutAlign}"
-                Style="{DynamicResource GreyBgRadioBtnStyle}"
-                Tag="AlignVerticalCenter">
+            x:Name="LayoutAlignVerticalCenter"
+            Grid.Row="1"
+            Grid.Column="1"
+            Width="32"
+            Height="32"
+            Margin="0,0,8,8"
+            VerticalContentAlignment="Center"
+            Background="Transparent"
+            Checked="Align_Checked"
+            Foreground="#616469"
+            GroupName="ImgAlign"
+            IsEnabled="{Binding ElementName=usercontrol, Path=IsLayoutAlign}"
+            Style="{DynamicResource GreyBgRadioBtnStyle}"
+            Tag="AlignVerticalCenter">
             <RadioButton.Content>
                 <Path
-                        Margin="5,0,0,0"
-                        Data="M7 7.25L9 7.25L9 4L12 4L12 7.25L15 7.25L15 8.75L12 8.75L12 12L9 12L9 8.75L7 8.75L7 14L4 14L4 8.75L1 8.75L1 7.25L4 7.25L4 2L7 2L7 7.25Z"
-                        Fill="{Binding ElementName=LayoutAlignVerticalCenter, Path=Foreground}" />
+                    Margin="5,0,0,0"
+                    Data="M7 7.25L9 7.25L9 4L12 4L12 7.25L15 7.25L15 8.75L12 8.75L12 12L9 12L9 8.75L7 8.75L7 14L4 14L4 8.75L1 8.75L1 7.25L4 7.25L4 2L7 2L7 7.25Z"
+                    Fill="{Binding ElementName=LayoutAlignVerticalCenter, Path=Foreground}" />
             </RadioButton.Content>
-           
+
         </RadioButton>
 
         <RadioButton
-                x:Name="LayoutAlignBottom"
-                Grid.Row="1"
-                Grid.Column="2"
-                Width="32"
-                Height="32"
-                VerticalContentAlignment="Center"
-                Background="Transparent"
-                Foreground="#616469"
-                GroupName="ImgAlign"
-                Checked="Align_Checked"
-                IsEnabled="{Binding ElementName=usercontrol,Path=IsLayoutAlign}"
-                Style="{DynamicResource GreyBgRadioBtnStyle}"
-                Tag="AlignBottom">
+            x:Name="LayoutAlignBottom"
+            Grid.Row="1"
+            Grid.Column="2"
+            Width="32"
+            Height="32"
+            Margin="0,0,8,8"
+            VerticalContentAlignment="Center"
+            Background="Transparent"
+            Checked="Align_Checked"
+            Foreground="#616469"
+            GroupName="ImgAlign"
+            IsEnabled="{Binding ElementName=usercontrol, Path=IsLayoutAlign}"
+            Style="{DynamicResource GreyBgRadioBtnStyle}"
+            Tag="AlignBottom">
             <RadioButton.Content>
                 <Path
-                        Margin="5,0,0,0"
-                        Data="M9 2H12V11H9V2ZM4 5H7V11H4V5ZM1 14H15V12.5H1V14Z"
-                        Fill="{Binding ElementName=LayoutAlignBottom, Path=Foreground}" />
+                    Margin="5,0,0,0"
+                    Data="M9 2H12V11H9V2ZM4 5H7V11H4V5ZM1 14H15V12.5H1V14Z"
+                    Fill="{Binding ElementName=LayoutAlignBottom, Path=Foreground}" />
             </RadioButton.Content>
-           
+
         </RadioButton>
 
-        <RadioButton
+        <StackPanel
+            Grid.Row="1"
+            Grid.Column="3"
+            Orientation="Horizontal">
+            <Separator
+                Grid.Row="0"
+                Height="16"
+                Margin="0,8,0,8"
+                HorizontalAlignment="Left"
+                VerticalAlignment="Top"
+                Background="{StaticResource color.sys.layout.divider}"
+                Style="{StaticResource VerticalSeparatorStyle}" />
+            <RadioButton
                 x:Name="LayoutDistributeVertical"
                 Grid.Row="1"
                 Grid.Column="3"
                 Width="32"
                 Height="32"
+                Margin="8,0,8,8"
                 VerticalContentAlignment="Center"
                 Background="Transparent"
+                Checked="Align_Checked"
                 Foreground="#616469"
                 GroupName="ImgAlign"
-                Checked="Align_Checked"
-                IsEnabled="{Binding ElementName=usercontrol,Path=IsLayoutAvgAlign}"
+                IsEnabled="{Binding ElementName=usercontrol, Path=IsLayoutAvgAlign}"
                 Style="{DynamicResource GreyBgRadioBtnStyle}"
                 Tag="DistributeVertical">
-            <RadioButton.Content>
-                <Path
+                <RadioButton.Content>
+                    <Path
                         Margin="5,0,0,0"
                         Data="M2 15V1H3.5V15H2ZM6.5 4H9.5V12H6.5V4ZM12.5 1V15H14V1H12.5Z"
                         Fill="{Binding ElementName=LayoutDistributeVertical, Path=Foreground}" />
-            </RadioButton.Content>
-        </RadioButton>
+                </RadioButton.Content>
+            </RadioButton>
+        </StackPanel>
 
     </Grid>
 </UserControl>

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

@@ -452,19 +452,15 @@
                             <Setter Property="Padding" Value="4,-1,0,0" />
                         </Trigger>
                         <Trigger Property="IsMouseOver" Value="true">
-                            <Setter TargetName="templateRoot" Property="Background" Value="#EDEEF0" />
+                            <Setter TargetName="templateRoot" Property="Background" Value="{StaticResource color.item-state.hov.bg}" />
                         </Trigger>
                         <Trigger Property="IsEnabled" Value="false">
                             <Setter TargetName="templateRoot" Property="Opacity" Value="0.5" />
                         </Trigger>
                         <Trigger Property="IsPressed" Value="true" />
                         <Trigger Property="IsChecked" Value="true">
-                            <Setter TargetName="templateRoot" Property="Background">
-                                <Setter.Value>
-                                    <SolidColorBrush Opacity="0.6" Color="#CED0D4" />
-                                </Setter.Value>
-                            </Setter>
-                            <Setter TargetName="templateRoot" Property="BorderBrush" Value="#CED0D4" />
+                            <Setter TargetName="templateRoot" Property="Background" Value="{StaticResource color.item-state.sel.bg.lv3}" />
+                            <Setter TargetName="templateRoot" Property="BorderBrush" Value="{StaticResource color.item-state.sel.border.lv3}" />
                             <Setter Property="Foreground" Value="#616469" />
                             <Setter TargetName="templateRoot" Property="BorderThickness" Value="1" />
                         </Trigger>

+ 22 - 21
PDF Office/Styles/SliderStyle.xaml

@@ -346,8 +346,8 @@
                                 <Track.Thumb>
                                     <Thumb
                                         Name="Thumb"
-                                        Width="8"
-                                        Height="16"
+                                        Width="14"
+                                        Height="14"
                                         VerticalAlignment="Center"
                                         Focusable="False"
                                         OverridesDefaultStyle="True">
@@ -360,33 +360,34 @@
                                                     <Path
                                                         Name="grip"
                                                         VerticalAlignment="Center"
-                                                        Fill="#477EDE"
+                                                        Effect="{StaticResource shadow.neutral.s}"
+                                                        Fill="{StaticResource color.slider.track-filled.norm}"
                                                         SnapsToDevicePixels="True"
                                                         Stretch="Fill"
-                                                        Stroke="#477EDE"
-                                                        StrokeThickness="1"
+                                                        Stroke="{StaticResource color.slider.knob.border}"
+                                                        StrokeThickness="2"
                                                         UseLayoutRounding="True">
                                                         <Path.Data>
-                                                            <RectangleGeometry
-                                                                RadiusX="4"
-                                                                RadiusY="4"
-                                                                Rect="0,0,8,16" />
+                                                            <EllipseGeometry
+                                                                Center="14,14"
+                                                                RadiusX="7"
+                                                                RadiusY="7" />
                                                         </Path.Data>
                                                     </Path>
                                                 </Grid>
                                                 <ControlTemplate.Triggers>
-                                                    <Trigger Property="UIElement.IsMouseOver" Value="True">
-                                                        <Setter TargetName="grip" Property="Shape.Fill" Value="#477EDE" />
-                                                        <Setter TargetName="grip" Property="Shape.Stroke" Value="#477EDE" />
-                                                    </Trigger>
-                                                    <Trigger Property="Thumb.IsDragging" Value="True">
-                                                        <Setter TargetName="grip" Property="Shape.Fill" Value="#477EDE" />
-                                                        <Setter TargetName="grip" Property="Shape.Stroke" Value="#477EDE" />
-                                                    </Trigger>
-                                                    <Trigger Property="UIElement.IsEnabled" Value="False">
-                                                        <Setter TargetName="grip" Property="Shape.Fill" Value="#477EDE" />
-                                                        <Setter TargetName="grip" Property="Shape.Stroke" Value="#477EDE" />
-                                                    </Trigger>
+                                                    <!--<Trigger Property="UIElement.IsMouseOver" Value="True">
+                                                                <Setter TargetName="grip" Property="Shape.Fill" Value="#477EDE" />
+                                                                <Setter TargetName="grip" Property="Shape.Stroke" Value="#477EDE" />
+                                                            </Trigger>
+                                                            <Trigger Property="Thumb.IsDragging" Value="True">
+                                                                <Setter TargetName="grip" Property="Shape.Fill" Value="#477EDE" />
+                                                                <Setter TargetName="grip" Property="Shape.Stroke" Value="#477EDE" />
+                                                            </Trigger>
+                                                            <Trigger Property="UIElement.IsEnabled" Value="False">
+                                                                <Setter TargetName="grip" Property="Shape.Fill" Value="#477EDE" />
+                                                                <Setter TargetName="grip" Property="Shape.Stroke" Value="#477EDE" />
+                                                            </Trigger>-->
                                                 </ControlTemplate.Triggers>
                                             </ControlTemplate>
                                         </Thumb.Template>

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

@@ -18,6 +18,7 @@
     <Style x:Key="PropertyHeaderLv2" TargetType="{x:Type TextBlock}">
         <Setter Property="FontFamily" Value="Segoe UI" />
         <Setter Property="FontSize" Value="12" />
+        <Setter Property="LineHeight" Value="20" />
         <Setter Property="FontWeight" Value="SemiBold" />
         <Setter Property="Foreground" Value="{StaticResource color.sys.text.neutral.lv2}" />
     </Style>

+ 28 - 2
PDF Office/ViewModels/PageEdit/PageEditContentViewModel.cs

@@ -378,6 +378,11 @@ namespace PDF_Office.ViewModels.PageEdit
         /// </summary>
         public DelegateCommand ReverseCommand { get; set; }
 
+        /// <summary>
+        /// 打印
+        /// </summary>
+        public DelegateCommand PrintCommand { get; set; }
+
         /// <summary>
         /// 放大
         /// </summary>
@@ -422,6 +427,7 @@ namespace PDF_Office.ViewModels.PageEdit
             CopyCommand = new DelegateCommand(copy);
             PasteCommand = new DelegateCommand(paste,CanPasteExcute).ObservesProperty(() => CanPaste);
             CutCommand = new DelegateCommand(cut);
+            PrintCommand = new DelegateCommand(print);
 
             //订阅页面刷新事件
             eventAggregator.GetEvent<PageEditRefreshEvent>().Subscribe(OnPageEditRefreshEvent, e => e.Unicode == unicode);
@@ -431,8 +437,6 @@ namespace PDF_Office.ViewModels.PageEdit
             RefreshPageRangeItem();
         }
 
-
-
         #region 事件
         private void Instance_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
         {
@@ -952,6 +956,15 @@ namespace PDF_Office.ViewModels.PageEdit
 
         #region 方法
 
+        private void print()
+        {
+            DialogParameters printValue = new DialogParameters();
+            printValue.Add(ParameterNames.PDFViewer, PDFViewer);
+            printValue.Add(ParameterNames.FilePath, PDFViewer.Document.FileName);
+            printValue.Add(ParameterNames.PrintCurrentPage, PDFViewer.CurrentIndex);
+            dialogs.ShowDialog(DialogNames.HomePagePrinterDialog, printValue, e => { });
+        }
+
         /// <summary>
         /// 剪切
         /// </summary>
@@ -2213,7 +2226,11 @@ namespace PDF_Office.ViewModels.PageEdit
                 {
                     PDFViewer.OnThumbnailGenerated -= PDFViewer_OnThumbnailGenerated;
                     PDFViewer.OnThumbnailGenerated += PDFViewer_OnThumbnailGenerated;
+                    PDFViewer.InfoChanged -= PDFViewer_InfoChanged;
                     PDFViewer.InfoChanged += PDFViewer_InfoChanged;
+                    PDFViewer.AnnotEditHandler -= PDFViewer_AnnotEditHandler;
+                    PDFViewer.AnnotEditHandler += PDFViewer_AnnotEditHandler;
+
                     ZoomIndex = 0;
                     if(viewContentViewModel!=null)
                     {
@@ -2237,6 +2254,15 @@ namespace PDF_Office.ViewModels.PageEdit
             }
         }
 
+        private void PDFViewer_AnnotEditHandler(object sender, List<ComPDFKitViewer.AnnotEvent.AnnotEditEvent> e)
+        {
+            if (e != null && e.Count > 0)
+            {
+                int pageIndex = e[0].PageIndex;
+                RefreshItemImage(pageIndex, pageIndex);
+            }
+        }
+
         private void PDFViewer_InfoChanged(object sender, KeyValuePair<string, object> e)
         {
             if(e.Key== "PageNum")

+ 1 - 1
PDF Office/Views/PageEdit/PageEditContent.xaml

@@ -134,7 +134,7 @@
                     Command="{Binding ShowPageSizeCommand}"
                     Header="隐藏页面大小"
                     Visibility="{Binding HasShowPageSize}" />
-                <MenuItem Header="打印页面" />
+                <MenuItem Header="打印页面" Command="{Binding PrintCommand}"/>
             </ContextMenu>
         </ResourceDictionary>
     </UserControl.Resources>

File diff ditekan karena terlalu besar
+ 132 - 113
PDF Office/Views/PropertyPanel/PDFEdit/ImageEditProperty.xaml


+ 41 - 15
PDF Office/Views/PropertyPanel/PDFEdit/ImageTextEditProperty.xaml

@@ -1,22 +1,48 @@
-<UserControl x:Class="PDF_Office.Views.PropertyPanel.PDFEdit.ImageTextEditProperty"
-             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:FormControl="clr-namespace:PDF_Office.CustomControl.Form"
-             xmlns:prism="http://prismlibrary.com/"
-             prism:ViewModelLocator.AutoWireViewModel="True"
-             xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
-             xmlns:local="clr-namespace:PDF_Office.Views.PropertyPanel.PDFEdit"
-             mc:Ignorable="d" 
-             d:DesignHeight="450" d:DesignWidth="800">
-    <Grid VerticalAlignment="Top">
-        <FormControl:LayoutAglinContent x:Name="laoutAglin" Grid.Row="1" IsLayoutAlign="{Binding IsLayoutAlign}" IsLayoutAvgAlign="{Binding IsLayoutAvgAlign}">
+<UserControl
+    x:Class="PDF_Office.Views.PropertyPanel.PDFEdit.ImageTextEditProperty"
+    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+    xmlns:FormControl="clr-namespace:PDF_Office.CustomControl.Form"
+    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.PDFEdit"
+    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+    xmlns:prism="http://prismlibrary.com/"
+    d:DesignHeight="450"
+    d:DesignWidth="800"
+    prism:ViewModelLocator.AutoWireViewModel="True"
+    Background="{StaticResource color.sys.layout.mg}"
+    mc:Ignorable="d">
+    <StackPanel Margin="16,14">
+        <TextBlock
+            Margin="0,0,0,14"
+            VerticalAlignment="Center"
+            FontFamily="Segoe UI"
+            FontSize="14"
+            FontWeight="SemiBold"
+            Foreground="{StaticResource color.sys.text.neutral.lv1}"
+            LineHeight="22"
+            Text="General Properties" />
+        <TextBlock
+            x:Name="AlignImg"
+            Margin="0,0,0,10"
+            FontFamily="Segoe UI"
+            FontSize="12"
+            FontWeight="SemiBold"
+            Foreground="{StaticResource color.sys.text.neutral.lv2}"
+            LineHeight="20">
+            Align
+        </TextBlock>
+        <FormControl:LayoutAglinContent
+            x:Name="laoutAglin"
+            Grid.Row="1"
+            IsLayoutAlign="{Binding IsLayoutAlign}"
+            IsLayoutAvgAlign="{Binding IsLayoutAvgAlign}">
             <i:Interaction.Triggers>
                 <i:EventTrigger EventName="ValueChanged">
                     <i:InvokeCommandAction Command="{Binding ImgAlignCheckedCommand}" CommandParameter="{Binding ElementName=laoutAglin, Path=Btntag}" />
                 </i:EventTrigger>
             </i:Interaction.Triggers>
         </FormControl:LayoutAglinContent>
-    </Grid>
+    </StackPanel>
 </UserControl>

+ 297 - 274
PDF Office/Views/PropertyPanel/PDFEdit/TextEditProperty.xaml

@@ -3,24 +3,24 @@
     xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
     xmlns:CompositeControl="clr-namespace:PDF_Office.CustomControl.CompositeControl"
-    xmlns:FormControl="clr-namespace:PDF_Office.CustomControl.Form"
     xmlns:Convert="clr-namespace:PDF_Office.DataConvert"
+    xmlns:FormControl="clr-namespace:PDF_Office.CustomControl.Form"
     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:form="clr-namespace:PDF_Office.CustomControl.Form"
     xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
     xmlns:local="clr-namespace:PDF_Office.Views.PropertyPanel"
     xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
     xmlns:pdfedit="clr-namespace:PDF_Office.Views.PropertyPanel.PDFEdit"
-    xmlns:form="clr-namespace:PDF_Office.CustomControl.Form"
     xmlns:prism="http://prismlibrary.com/"
-    prism:ViewModelLocator.AutoWireViewModel="True"
     d:DesignHeight="450"
-    d:DesignWidth="800"
-    
+    d:DesignWidth="260"
+    prism:ViewModelLocator.AutoWireViewModel="True"
+    Background="{StaticResource color.sys.layout.mg}"
     Loaded="UserControl_Loaded"
     mc:Ignorable="d">
-    <!--d:DataContext="{d:DesignInstance Type=pdfedit:TextEditPropertyViewModel}"-->
+    <!--  d:DataContext="{d:DesignInstance Type=pdfedit:TextEditPropertyViewModel}"  -->
     <UserControl.Resources>
         <ResourceDictionary>
             <ResourceDictionary.MergedDictionaries>
@@ -57,7 +57,7 @@
 
         </ResourceDictionary>
     </UserControl.Resources>
-    <Grid Background="#F3F3F3">
+    <Grid Margin="16,14">
         <Grid.RowDefinitions>
             <RowDefinition Height="Auto" />
             <RowDefinition Height="Auto" />
@@ -67,20 +67,19 @@
             <StackPanel Visibility="{Binding IsTextEdit, Converter={StaticResource BoolToVisible}}">
                 <TextBlock
                     Name="AnnotTypeTitle"
-                    Margin="10,8,0,0"
                     HorizontalAlignment="Left"
-                    FontFamily="Segoe UI Semibold"
-                    FontSize="18"
+                    FontFamily="Segoe UI"
+                    FontSize="14"
                     FontWeight="SemiBold"
-                    LineHeight="24">
+                    LineHeight="22">
                     Freetext
                 </TextBlock>
                 <Border
                     Width="228"
-                    Height="100"
+                    Height="88"
                     Margin="0,8,0,0"
-                    Background="White"
-                    BorderBrush="#DDDDDD"
+                    Background="{StaticResource color.field.bg.def}"
+                    BorderBrush="{StaticResource color.field.border.norm}"
                     BorderThickness="1"
                     CornerRadius="2">
                     <Grid>
@@ -133,65 +132,273 @@
 
                 <Border
                     Height="32"
-                    Margin="12,0,4,0"
+                    Margin="0,8,0,18"
                     BorderBrush="#E2E3E6"
                     BorderThickness="0">
-                    <StackPanel Orientation="Horizontal">
-                        <CompositeControl:CustomComboControl x:Name="FontTitleBox" Width="148"
-                                                                     ItemSource="{Binding PresetTextItems}" SelectedItems="{Binding PresetTextData,Mode=TwoWay}"
-                                                                     IsValueContent="True" Height="32">
-                        </CompositeControl:CustomComboControl>
+                    <Grid>
+                        <CompositeControl:CustomComboControl
+                            x:Name="FontTitleBox"
+                            Width="188"
+                            Height="32"
+                            HorizontalAlignment="Left"
+                            IsValueContent="True"
+                            ItemSource="{Binding PresetTextItems}"
+                            SelectedItems="{Binding PresetTextData, Mode=TwoWay}" />
+
 
-                  
                         <Button
                             Width="32"
                             Height="32"
-                            ContextMenu="{StaticResource BtnFlyoutMenu}" />
-                    </StackPanel>
+                            HorizontalAlignment="Right"
+                            ContextMenu="{StaticResource BtnFlyoutMenu}"
+                            Style="{StaticResource btn.sec}">
+                            <Path
+                                Width="16"
+                                Height="16"
+                                Data="M4 8C4 8.82843 3.32843 9.5 2.5 9.5C1.67157 9.5 1 8.82843 1 8C1 7.17157 1.67157 6.5 2.5 6.5C3.32843 6.5 4 7.17157 4 8ZM9.3999 8C9.3999 8.82843 8.72833 9.5 7.8999 9.5C7.07148 9.5 6.3999 8.82843 6.3999 8C6.3999 7.17157 7.07148 6.5 7.8999 6.5C8.72833 6.5 9.3999 7.17157 9.3999 8ZM13.5 9.5C14.3284 9.5 15 8.82843 15 8C15 7.17157 14.3284 6.5 13.5 6.5C12.6716 6.5 12 7.17157 12 8C12 8.82843 12.6716 9.5 13.5 9.5Z"
+                                Fill="{StaticResource color.icon.base.neutral.norm.lv1}" />
+                        </Button>
+                    </Grid>
                 </Border>
 
                 <StackPanel>
                     <TextBlock
-                        Margin="0,18,0,10"
+                        Margin="0,0,0,10"
                         Style="{StaticResource PropertyHeaderLv2}"
                         Text="文本" />
 
-                    <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>
-
-                        <CompositeControl:CustomComboControl x:Name="FontFamilyBox" HorizontalAlignment="Left"
-                                                                     ItemSource="{Binding FontFamilyItems}" SelectedItems="{Binding FontFamilyData,Mode=TwoWay}"
-                                                                     IsValueContent="True" Grid.ColumnSpan="2"  Width="168" Height="32">
-                        </CompositeControl:CustomComboControl>
-
-                        <CompositeControl:CustomComboControl x:Name="FontStyleBox" Grid.Row="1"
-                                                                     Width="148" Height="32" Margin="12,8,4,0"
-                                                                     ItemSource="{Binding FontStyleItems}"  SelectedItems="{Binding FontWeightStyleItem,Mode=TwoWay}"
-                                                                     IsValueContent="True" Grid.Column="0">
-                        </CompositeControl:CustomComboControl>
-
-
-                        <CompositeControl:CustomComboControl x:Name="FontSizeBox" Grid.Row="0" Grid.Column="1" SelectedItems="{Binding FontSizeData,Mode=TwoWay}"
-                                                                     Width="80" Height="32" Margin="-1,0,0,0"
-                                                                     >
-                        </CompositeControl:CustomComboControl>
+                    <StackPanel>
+                        <CompositeControl:CustomComboControl
+                            x:Name="FontFamilyBox"
+                            Height="32"
+                            IsValueContent="True"
+                            ItemSource="{Binding FontFamilyItems}"
+                            SelectedItems="{Binding FontFamilyData, Mode=TwoWay}" />
+
+                        <Grid Margin="0,8">
+                            <CompositeControl:CustomComboControl
+                                x:Name="FontStyleBox"
+                                Width="110"
+                                Height="32"
+                                HorizontalAlignment="Left"
+                                IsValueContent="True"
+                                ItemSource="{Binding FontStyleItems}"
+                                SelectedItems="{Binding FontWeightStyleItem, Mode=TwoWay}" />
 
 
-                        <cusColor:ColorSubContent
-                        x:Name="FontColorBox"
-                        Grid.Row="1"
-                        Grid.Column="1"
-                        HorizontalAlignment="Left" />
-                    </Grid>
-
+                            <CompositeControl:CustomComboControl
+                                x:Name="FontSizeBox"
+                                Width="110"
+                                Height="32"
+                                HorizontalAlignment="Right"
+                                SelectedItems="{Binding FontSizeData, Mode=TwoWay}" />
+                        </Grid>
+                        <Grid>
+                            <StackPanel Orientation="Horizontal">
+                                <RadioButton
+                                    x:Name="TextAlignLeftBtn"
+                                    Width="32"
+                                    Height="32"
+                                    VerticalContentAlignment="Center"
+                                    Background="Transparent"
+                                    Foreground="#616469"
+                                    GroupName="TextAlign"
+                                    IsChecked="True"
+                                    Style="{DynamicResource GreyBgRadioBtnStyle}"
+                                    Tag="AlignLeft">
+                                    <RadioButton.Content>
+                                        <Grid Width="32" Height="32">
+                                            <Canvas Margin="5,10,0,0">
+                                                <Rectangle
+                                                    Canvas.Top="0.25"
+                                                    Width="14"
+                                                    Height="1.5"
+                                                    Stroke="{Binding ElementName=TextAlignLeftBtn, Path=Foreground}"
+                                                    StrokeThickness="1.5" />
+                                                <Rectangle
+                                                    Canvas.Top="4.25"
+                                                    Width="8"
+                                                    Height="1.5"
+                                                    Stroke="{Binding ElementName=TextAlignLeftBtn, Path=Foreground}"
+                                                    StrokeThickness="1.5" />
+                                                <Rectangle
+                                                    Canvas.Top="12.25"
+                                                    Width="8"
+                                                    Height="1.5"
+                                                    Stroke="{Binding ElementName=TextAlignLeftBtn, Path=Foreground}"
+                                                    StrokeThickness="1.5" />
+                                                <Rectangle
+                                                    Canvas.Top="8.25"
+                                                    Width="14"
+                                                    Height="1.5"
+                                                    Stroke="{Binding ElementName=TextAlignLeftBtn, Path=Foreground}"
+                                                    StrokeThickness="1.5" />
+                                            </Canvas>
+                                        </Grid>
+                                    </RadioButton.Content>
+                                    <i:Interaction.Triggers>
+                                        <i:EventTrigger EventName="Checked">
+                                            <i:InvokeCommandAction Command="{Binding TextAlignCheckedCommand}" CommandParameter="{Binding ElementName=TextAlignLeftBtn, Path=Tag}" />
+                                        </i:EventTrigger>
+                                    </i:Interaction.Triggers>
+                                </RadioButton>
+
+                                <RadioButton
+                                    x:Name="TextAlignCenterBtn"
+                                    Width="32"
+                                    Height="32"
+                                    Margin="8,0"
+                                    VerticalContentAlignment="Center"
+                                    Background="Transparent"
+                                    Foreground="#616469"
+                                    GroupName="TextAlign"
+                                    Style="{DynamicResource GreyBgRadioBtnStyle}"
+                                    Tag="AlignCenter">
+                                    <RadioButton.Content>
+                                        <Grid Width="32" Height="32">
+                                            <Canvas Margin="5,10,0,0">
+                                                <Rectangle
+                                                    Canvas.Top="0.25"
+                                                    Width="14"
+                                                    Height="1.5"
+                                                    Stroke="{Binding ElementName=TextAlignCenterBtn, Path=Foreground}"
+                                                    StrokeThickness="1.5" />
+                                                <Rectangle
+                                                    Canvas.Left="3"
+                                                    Canvas.Top="4.25"
+                                                    Width="8"
+                                                    Height="1.5"
+                                                    Stroke="{Binding ElementName=TextAlignCenterBtn, Path=Foreground}"
+                                                    StrokeThickness="1.5" />
+                                                <Rectangle
+                                                    Canvas.Left="3"
+                                                    Canvas.Top="12.25"
+                                                    Width="8"
+                                                    Height="1.5"
+                                                    Stroke="{Binding ElementName=TextAlignCenterBtn, Path=Foreground}"
+                                                    StrokeThickness="1.5" />
+                                                <Rectangle
+                                                    Canvas.Top="8.25"
+                                                    Width="14"
+                                                    Height="1.5"
+                                                    Stroke="{Binding ElementName=TextAlignCenterBtn, Path=Foreground}"
+                                                    StrokeThickness="1.5" />
+                                            </Canvas>
+                                        </Grid>
+                                    </RadioButton.Content>
+                                    <i:Interaction.Triggers>
+                                        <i:EventTrigger EventName="Checked">
+                                            <i:InvokeCommandAction Command="{Binding TextAlignCheckedCommand}" CommandParameter="{Binding ElementName=TextAlignCenterBtn, Path=Tag}" />
+                                        </i:EventTrigger>
+                                    </i:Interaction.Triggers>
+                                </RadioButton>
+
+                                <RadioButton
+                                    x:Name="TextAlignRightBtn"
+                                    Grid.Column="2"
+                                    Width="32"
+                                    Height="32"
+                                    VerticalContentAlignment="Center"
+                                    Background="Transparent"
+                                    Foreground="#616469"
+                                    GroupName="TextAlign"
+                                    Style="{DynamicResource GreyBgRadioBtnStyle}"
+                                    Tag="AlignRight">
+                                    <RadioButton.Content>
+                                        <Grid Width="32" Height="32">
+                                            <Canvas Margin="5,10,0,0">
+                                                <Rectangle
+                                                    Canvas.Top="0.25"
+                                                    Width="14"
+                                                    Height="1.5"
+                                                    Stroke="{Binding ElementName=TextAlignRightBtn, Path=Foreground}"
+                                                    StrokeThickness="1.5" />
+                                                <Rectangle
+                                                    Canvas.Left="6"
+                                                    Canvas.Top="4.25"
+                                                    Width="8"
+                                                    Height="1.5"
+                                                    Stroke="{Binding ElementName=TextAlignRightBtn, Path=Foreground}"
+                                                    StrokeThickness="1.5" />
+                                                <Rectangle
+                                                    Canvas.Left="6"
+                                                    Canvas.Top="12.25"
+                                                    Width="8"
+                                                    Height="1.5"
+                                                    Stroke="{Binding ElementName=TextAlignRightBtn, Path=Foreground}"
+                                                    StrokeThickness="1.5" />
+                                                <Rectangle
+                                                    Canvas.Top="8.25"
+                                                    Width="14"
+                                                    Height="1.5"
+                                                    Stroke="{Binding ElementName=TextAlignRightBtn, Path=Foreground}"
+                                                    StrokeThickness="1.5" />
+                                            </Canvas>
+                                        </Grid>
+                                    </RadioButton.Content>
+                                    <i:Interaction.Triggers>
+                                        <i:EventTrigger EventName="Checked">
+                                            <i:InvokeCommandAction Command="{Binding TextAlignCheckedCommand}" CommandParameter="{Binding ElementName=TextAlignRightBtn, Path=Tag}" />
+                                        </i:EventTrigger>
+                                    </i:Interaction.Triggers>
+                                </RadioButton>
+
+                                <RadioButton
+                                    x:Name="TextAlignBtn"
+                                    Grid.Column="3"
+                                    Width="32"
+                                    Height="32"
+                                    Margin="8,0"
+                                    VerticalContentAlignment="Center"
+                                    Background="Transparent"
+                                    Foreground="#616469"
+                                    GroupName="TextAlign"
+                                    Style="{DynamicResource GreyBgRadioBtnStyle}"
+                                    Tag="Align">
+                                    <RadioButton.Content>
+                                        <Grid Width="32" Height="32">
+                                            <Canvas Margin="5,10,0,0">
+                                                <Rectangle
+                                                    Canvas.Top="0.25"
+                                                    Width="14"
+                                                    Height="1.5"
+                                                    Stroke="{Binding ElementName=TextAlignBtn, Path=Foreground}"
+                                                    StrokeThickness="1.5" />
+                                                <Rectangle
+                                                    Canvas.Top="8.25"
+                                                    Width="14"
+                                                    Height="1.5"
+                                                    Stroke="{Binding ElementName=TextAlignBtn, Path=Foreground}"
+                                                    StrokeThickness="1.5" />
+                                                <Rectangle
+                                                    Canvas.Top="4.25"
+                                                    Width="14"
+                                                    Height="1.5"
+                                                    Stroke="{Binding ElementName=TextAlignBtn, Path=Foreground}"
+                                                    StrokeThickness="1.5" />
+                                                <Rectangle
+                                                    Canvas.Top="12.25"
+                                                    Width="14"
+                                                    Height="1.5"
+                                                    Stroke="{Binding ElementName=TextAlignBtn, Path=Foreground}"
+                                                    StrokeThickness="1.5" />
+                                            </Canvas>
+                                        </Grid>
+                                    </RadioButton.Content>
+                                    <i:Interaction.Triggers>
+                                        <i:EventTrigger EventName="Checked">
+                                            <i:InvokeCommandAction Command="{Binding TextAlignCheckedCommand}" CommandParameter="{Binding ElementName=TextAlignBtn, Path=Tag}" />
+                                        </i:EventTrigger>
+                                    </i:Interaction.Triggers>
+                                </RadioButton>
+                            </StackPanel>
+                            <cusColor:ColorContent
+                                x:Name="FontColorBox"
+                                Width="56"
+                                HorizontalAlignment="Right"
+                                ShowColorList="Collapsed" />
+                        </Grid>
+                    </StackPanel>
                 </StackPanel>
 
 
@@ -205,6 +412,7 @@
                     Font
                 </TextBlock>-->
 
+
                 <!--<Grid Margin="0,6,0,0">
                     <Grid.ColumnDefinitions>
                         <ColumnDefinition Width="auto" />
@@ -216,7 +424,8 @@
                         <RowDefinition Height="auto" />
                     </Grid.RowDefinitions>
 
-                    <Border
+                -->
+                <!--<Border
                         Grid.ColumnSpan="2"
                         Width="228"
                         Height="32"
@@ -224,7 +433,8 @@
                         BorderBrush="#E2E3E6"
                         BorderThickness="0">
                         <Grid>
-                            <ComboBox
+                -->
+                <!--<ComboBox
                                 Name="FontFamilyBox"
                                 Padding="10,10,0,0"
                                 Background="Transparent"
@@ -271,7 +481,8 @@
                                         <i:InvokeCommandAction Command="{Binding FontFamilyChangedCommand}" CommandParameter="{Binding ElementName=FontFamilyBox, Path=SelectedIndex}" />
                                     </i:EventTrigger>
                                 </i:Interaction.Triggers>
-                            </ComboBox>
+                            </ComboBox>-->
+                <!--
 
                             <TextBox
                                 Name="FontFamilyText"
@@ -285,15 +496,15 @@
                                 IsReadOnly="True"
                                 TextAlignment="Left" />
                         </Grid>
-                    </Border>
+                    </Border>-->
 
-                    <cusColor:ColorSubContent
+                <!--<cusColor:ColorSubContent
                         x:Name="FontColorBox"
                         Grid.Row="2"
                         Grid.Column="1"
-                        HorizontalAlignment="Left" />
+                        HorizontalAlignment="Left" />-->
 
-                    <Border
+                <!--<Border
                         Grid.Row="1"
                         Width="148"
                         Height="32"
@@ -361,9 +572,9 @@
                                 IsReadOnly="True"
                                 TextAlignment="Left" />
                         </Grid>
-                    </Border>
+                    </Border>-->
 
-                    <Border
+                <!--<Border
                         Grid.Row="1"
                         Grid.Column="1"
                         Width="80"
@@ -371,7 +582,8 @@
                         Margin="-1,8,0,0"
                         BorderBrush="#E2E3E6"
                         BorderThickness="0">
-                        <Grid>
+                -->
+                <!--<Grid>
                             <ComboBox
                                 Name="FontSizeBox"
                                 Background="Transparent"
@@ -497,8 +709,10 @@
                                 FontSize="14"
                                 IsReadOnly="True"
                                 TextAlignment="Left" />
-                        </Grid>
-                    </Border>
+                        </Grid>-->
+                <!--
+                    </Border>-->
+                <!--
 
 
                     <Border
@@ -516,212 +730,17 @@
                             </Grid.ColumnDefinitions>
 
 
-                            <RadioButton
-                                x:Name="TextAlignLeftBtn"
-                                Width="32"
-                                Height="32"
-                                VerticalContentAlignment="Center"
-                                Background="Transparent"
-                                Foreground="#616469"
-                                GroupName="TextAlign"
-                                IsChecked="True"
-                                Style="{DynamicResource GreyBgRadioBtnStyle}"
-                                Tag="AlignLeft">
-                                <RadioButton.Content>
-                                    <Grid Width="32" Height="32">
-                                        <Canvas Margin="5,10,0,0">
-                                            <Rectangle
-                                                Canvas.Top="0.25"
-                                                Width="14"
-                                                Height="1.5"
-                                                Stroke="{Binding ElementName=TextAlignLeftBtn, Path=Foreground}"
-                                                StrokeThickness="1.5" />
-                                            <Rectangle
-                                                Canvas.Top="4.25"
-                                                Width="8"
-                                                Height="1.5"
-                                                Stroke="{Binding ElementName=TextAlignLeftBtn, Path=Foreground}"
-                                                StrokeThickness="1.5" />
-                                            <Rectangle
-                                                Canvas.Top="12.25"
-                                                Width="8"
-                                                Height="1.5"
-                                                Stroke="{Binding ElementName=TextAlignLeftBtn, Path=Foreground}"
-                                                StrokeThickness="1.5" />
-                                            <Rectangle
-                                                Canvas.Top="8.25"
-                                                Width="14"
-                                                Height="1.5"
-                                                Stroke="{Binding ElementName=TextAlignLeftBtn, Path=Foreground}"
-                                                StrokeThickness="1.5" />
-                                        </Canvas>
-                                    </Grid>
-                                </RadioButton.Content>
-                                <i:Interaction.Triggers>
-                                    <i:EventTrigger EventName="Checked">
-                                        <i:InvokeCommandAction Command="{Binding TextAlignCheckedCommand}" CommandParameter="{Binding ElementName=TextAlignLeftBtn, Path=Tag}" />
-                                    </i:EventTrigger>
-                                </i:Interaction.Triggers>
-                            </RadioButton>
-
-                            <RadioButton
-                                x:Name="TextAlignCenterBtn"
-                                Grid.Column="1"
-                                Width="32"
-                                Height="32"
-                                VerticalContentAlignment="Center"
-                                Background="Transparent"
-                                Foreground="#616469"
-                                GroupName="TextAlign"
-                                Style="{DynamicResource GreyBgRadioBtnStyle}"
-                                Tag="AlignCenter">
-                                <RadioButton.Content>
-                                    <Grid Width="32" Height="32">
-                                        <Canvas Margin="5,10,0,0">
-                                            <Rectangle
-                                                Canvas.Top="0.25"
-                                                Width="14"
-                                                Height="1.5"
-                                                Stroke="{Binding ElementName=TextAlignCenterBtn, Path=Foreground}"
-                                                StrokeThickness="1.5" />
-                                            <Rectangle
-                                                Canvas.Left="3"
-                                                Canvas.Top="4.25"
-                                                Width="8"
-                                                Height="1.5"
-                                                Stroke="{Binding ElementName=TextAlignCenterBtn, Path=Foreground}"
-                                                StrokeThickness="1.5" />
-                                            <Rectangle
-                                                Canvas.Left="3"
-                                                Canvas.Top="12.25"
-                                                Width="8"
-                                                Height="1.5"
-                                                Stroke="{Binding ElementName=TextAlignCenterBtn, Path=Foreground}"
-                                                StrokeThickness="1.5" />
-                                            <Rectangle
-                                                Canvas.Top="8.25"
-                                                Width="14"
-                                                Height="1.5"
-                                                Stroke="{Binding ElementName=TextAlignCenterBtn, Path=Foreground}"
-                                                StrokeThickness="1.5" />
-                                        </Canvas>
-                                    </Grid>
-                                </RadioButton.Content>
-                                <i:Interaction.Triggers>
-                                    <i:EventTrigger EventName="Checked">
-                                        <i:InvokeCommandAction Command="{Binding TextAlignCheckedCommand}" CommandParameter="{Binding ElementName=TextAlignCenterBtn, Path=Tag}" />
-                                    </i:EventTrigger>
-                                </i:Interaction.Triggers>
-                            </RadioButton>
-
-                            <RadioButton
-                                x:Name="TextAlignRightBtn"
-                                Grid.Column="2"
-                                Width="32"
-                                Height="32"
-                                VerticalContentAlignment="Center"
-                                Background="Transparent"
-                                Foreground="#616469"
-                                GroupName="TextAlign"
-                                Style="{DynamicResource GreyBgRadioBtnStyle}"
-                                Tag="AlignRight">
-                                <RadioButton.Content>
-                                    <Grid Width="32" Height="32">
-                                        <Canvas Margin="5,10,0,0">
-                                            <Rectangle
-                                                Canvas.Top="0.25"
-                                                Width="14"
-                                                Height="1.5"
-                                                Stroke="{Binding ElementName=TextAlignRightBtn, Path=Foreground}"
-                                                StrokeThickness="1.5" />
-                                            <Rectangle
-                                                Canvas.Left="6"
-                                                Canvas.Top="4.25"
-                                                Width="8"
-                                                Height="1.5"
-                                                Stroke="{Binding ElementName=TextAlignRightBtn, Path=Foreground}"
-                                                StrokeThickness="1.5" />
-                                            <Rectangle
-                                                Canvas.Left="6"
-                                                Canvas.Top="12.25"
-                                                Width="8"
-                                                Height="1.5"
-                                                Stroke="{Binding ElementName=TextAlignRightBtn, Path=Foreground}"
-                                                StrokeThickness="1.5" />
-                                            <Rectangle
-                                                Canvas.Top="8.25"
-                                                Width="14"
-                                                Height="1.5"
-                                                Stroke="{Binding ElementName=TextAlignRightBtn, Path=Foreground}"
-                                                StrokeThickness="1.5" />
-                                        </Canvas>
-                                    </Grid>
-                                </RadioButton.Content>
-                                <i:Interaction.Triggers>
-                                    <i:EventTrigger EventName="Checked">
-                                        <i:InvokeCommandAction Command="{Binding TextAlignCheckedCommand}" CommandParameter="{Binding ElementName=TextAlignRightBtn, Path=Tag}" />
-                                    </i:EventTrigger>
-                                </i:Interaction.Triggers>
-                            </RadioButton>
-
-                            <RadioButton
-                                x:Name="TextAlignBtn"
-                                Grid.Column="3"
-                                Width="32"
-                                Height="32"
-                                VerticalContentAlignment="Center"
-                                Background="Transparent"
-                                Foreground="#616469"
-                                GroupName="TextAlign"
-                                Style="{DynamicResource GreyBgRadioBtnStyle}"
-                                Tag="Align">
-                                <RadioButton.Content>
-                                    <Grid Width="32" Height="32">
-                                        <Canvas Margin="5,10,0,0">
-                                            <Rectangle
-                                                Canvas.Top="0.25"
-                                                Width="14"
-                                                Height="1.5"
-                                                Stroke="{Binding ElementName=TextAlignBtn, Path=Foreground}"
-                                                StrokeThickness="1.5" />
-                                            <Rectangle
-                                                Canvas.Top="8.25"
-                                                Width="14"
-                                                Height="1.5"
-                                                Stroke="{Binding ElementName=TextAlignBtn, Path=Foreground}"
-                                                StrokeThickness="1.5" />
-                                            <Rectangle
-                                                Canvas.Top="4.25"
-                                                Width="14"
-                                                Height="1.5"
-                                                Stroke="{Binding ElementName=TextAlignBtn, Path=Foreground}"
-                                                StrokeThickness="1.5" />
-                                            <Rectangle
-                                                Canvas.Top="12.25"
-                                                Width="14"
-                                                Height="1.5"
-                                                Stroke="{Binding ElementName=TextAlignBtn, Path=Foreground}"
-                                                StrokeThickness="1.5" />
-                                        </Canvas>
-                                    </Grid>
-                                </RadioButton.Content>
-                                <i:Interaction.Triggers>
-                                    <i:EventTrigger EventName="Checked">
-                                        <i:InvokeCommandAction Command="{Binding TextAlignCheckedCommand}" CommandParameter="{Binding ElementName=TextAlignBtn, Path=Tag}" />
-                                    </i:EventTrigger>
-                                </i:Interaction.Triggers>
-                            </RadioButton>
-
                         </Grid>
                     </Border>
                 </Grid>-->
 
                 <TextBlock
-                    x:Name="AlignText"
-                    Margin="12,14,0,0"
-                    FontFamily="Segoe UI Semibold"
-                    FontSize="14"
+                    x:Name="AlignImg"
+                    Margin="0,18,0,10"
+                    FontFamily="Segoe UI"
+                    FontSize="12"
                     FontWeight="SemiBold"
+                    Foreground="{StaticResource color.sys.text.neutral.lv2}"
                     LineHeight="20">
                     Align
                 </TextBlock>
@@ -859,10 +878,10 @@
 
         </Grid>
 
-        <StackPanel Visibility="{Binding IsSelectTextAndImg, Converter={StaticResource BoolToVisible}}">
+        <!--<StackPanel Visibility="{Binding IsSelectTextAndImg, Converter={StaticResource BoolToVisible}}">
             <TextBlock
                 x:Name="GeneralProperties"
-                Margin="12,14,0,0"
+                Margin="12,0,0,0"
                 FontFamily="Segoe UI Semibold"
                 FontSize="14"
                 FontWeight="SemiBold"
@@ -878,8 +897,12 @@
                 LineHeight="20">
                 Align
             </TextBlock>
-        </StackPanel>
-        <FormControl:LayoutAglinContent x:Name="laoutAglin" Grid.Row="1" IsLayoutAlign="{Binding IsLayoutAlign}" IsLayoutAvgAlign="{Binding IsLayoutAvgAlign}">
+        </StackPanel>-->
+        <FormControl:LayoutAglinContent
+            x:Name="laoutAglin"
+            Grid.Row="1"
+            IsLayoutAlign="{Binding IsLayoutAlign}"
+            IsLayoutAvgAlign="{Binding IsLayoutAvgAlign}">
             <i:Interaction.Triggers>
                 <i:EventTrigger EventName="ValueChanged">
                     <i:InvokeCommandAction Command="{Binding ImgAlignCheckedCommand}" CommandParameter="{Binding ElementName=laoutAglin, Path=Btntag}" />

File diff ditekan karena terlalu besar
+ 68 - 25
PDF Office/Views/Tools/TextEditToolContent.xaml