|
@@ -2,6 +2,11 @@
|
|
|
x:Class="PDF_Office.Views.FillAndSign.PropertyPanel.ShapFillProperty"
|
|
|
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:cus="clr-namespace:PDF_Office.CustomControl"
|
|
|
+ xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
|
|
|
+ xmlns:Convert="clr-namespace:PDF_Office.DataConvert"
|
|
|
+ xmlns:DashConvert="clr-namespace:PDF_Office.ViewModels.PropertyPanel.AnnotPanel"
|
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
|
xmlns:local="clr-namespace:PDF_Office.Views.FillAndSign.PropertyPanel"
|
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
@@ -10,10 +15,309 @@
|
|
|
d:DesignWidth="260"
|
|
|
prism:ViewModelLocator.AutoWireViewModel="True"
|
|
|
mc:Ignorable="d">
|
|
|
- <Grid Margin="16">
|
|
|
- <TextBlock
|
|
|
- FontSize="16"
|
|
|
- LineHeight="24"
|
|
|
- Text="勾形" />
|
|
|
+ <UserControl.Resources>
|
|
|
+ <ResourceDictionary>
|
|
|
+ <ResourceDictionary.MergedDictionaries>
|
|
|
+ <ResourceDictionary Source="../../../Styles/SliderStyle.xaml" />
|
|
|
+ <ResourceDictionary Source="../../../Styles/CustomBtnStyle.xaml" />
|
|
|
+ </ResourceDictionary.MergedDictionaries>
|
|
|
+ <Convert:ColorToBrushConverter x:Key="ColorToBrushConvert" />
|
|
|
+ <Convert:CheckToVisibleMutiConvert x:Key="CheckToVisibleMutiConvert" />
|
|
|
+ <DashConvert:DashStyleConverter x:Key="DashStyleConverter" />
|
|
|
+ <Convert:InvertBoolToVisibleConvert x:Key="InvertBoolToVisibleConvert"/>
|
|
|
+ </ResourceDictionary>
|
|
|
+ </UserControl.Resources>
|
|
|
+ <Grid Background="#F3F3F3">
|
|
|
+ <StackPanel Margin="16,0,16,0">
|
|
|
+ <TextBlock
|
|
|
+ Name="AnnotTypeTitle"
|
|
|
+ Margin="10,8,0,0"
|
|
|
+ HorizontalAlignment="Left"
|
|
|
+ FontFamily="SegoeUI"
|
|
|
+ FontSize="18"
|
|
|
+ FontWeight="Bold"
|
|
|
+ LineHeight="24"
|
|
|
+ Text="{Binding AnnotTypeTitle}" />
|
|
|
+ <Border
|
|
|
+ Width="228"
|
|
|
+ Height="100"
|
|
|
+ Margin="0,8,0,0"
|
|
|
+ Background="White"
|
|
|
+ BorderBrush="#DDDDDD"
|
|
|
+ BorderThickness="1"
|
|
|
+ CornerRadius="2"
|
|
|
+ Visibility="{Binding IsMultiSelected,Converter={StaticResource InvertBoolToVisibleConvert}}"
|
|
|
+ >
|
|
|
+
|
|
|
+ <Grid>
|
|
|
+ <Path
|
|
|
+ Name="SharpPath"
|
|
|
+ Width="36"
|
|
|
+ Height="36"
|
|
|
+ HorizontalAlignment="Center"
|
|
|
+ VerticalAlignment="Center"
|
|
|
+ Data="{Binding DataPath}"
|
|
|
+ Stroke="{Binding SelectColor}"
|
|
|
+ Opacity="{Binding FillOpacity}"
|
|
|
+ StrokeDashArray="{Binding Dash, Converter={StaticResource DashStyleConverter}}"
|
|
|
+ StrokeStartLineCap="Flat"
|
|
|
+ StrokeThickness="{Binding LineWidth}">
|
|
|
+ <!--Fill="{Binding FillColor}"-->
|
|
|
+ <!-- ,Converter={StaticResource ColorToBrushConvert} -->
|
|
|
+ </Path>
|
|
|
+ </Grid>
|
|
|
+ </Border>
|
|
|
+
|
|
|
+ <Grid Margin="0,18,0,0">
|
|
|
+ <Grid.RowDefinitions>
|
|
|
+ <RowDefinition Height="auto" />
|
|
|
+ <RowDefinition />
|
|
|
+ </Grid.RowDefinitions>
|
|
|
+ <TextBlock Text="Color" VerticalAlignment="Center"/>
|
|
|
+ <CompositeControl:SlidContent x:Name="layerThick" HorizontalAlignment="Right"
|
|
|
+ Visibility="{Binding IsMultiSelected,Converter={StaticResource InvertBoolToVisibleConvert}}"
|
|
|
+ >
|
|
|
+ <i:Interaction.Triggers>
|
|
|
+ <i:EventTrigger EventName="SelectedValueChanged">
|
|
|
+ <i:InvokeCommandAction Command="{Binding SelectedOpacityValueCommand}" CommandParameter="{Binding ElementName=layerThick,Path=Value}"/>
|
|
|
+ </i:EventTrigger>
|
|
|
+ </i:Interaction.Triggers>
|
|
|
+ </CompositeControl:SlidContent>
|
|
|
+ <CompositeControl:ColorContent x:Name="cusColor" Grid.Row="1" />
|
|
|
+
|
|
|
+ </Grid>
|
|
|
+
|
|
|
+ <Grid Margin="0,18,0,0">
|
|
|
+ <Grid.RowDefinitions>
|
|
|
+ <RowDefinition Height="auto" />
|
|
|
+ <RowDefinition />
|
|
|
+ </Grid.RowDefinitions>
|
|
|
+ <TextBlock Text="Line Style" VerticalAlignment="Center"/>
|
|
|
+ <Grid Grid.Row="1" Margin="0,10,0,0">
|
|
|
+ <Grid.ColumnDefinitions>
|
|
|
+ <ColumnDefinition Width="*" />
|
|
|
+ <ColumnDefinition Width="80" />
|
|
|
+ </Grid.ColumnDefinitions>
|
|
|
+ <Slider
|
|
|
+ Name="BorderSlider"
|
|
|
+ Margin="0,0,4,0"
|
|
|
+ VerticalAlignment="Center"
|
|
|
+ IsMoveToPointEnabled="True"
|
|
|
+ IsSelectionRangeEnabled="True"
|
|
|
+ IsSnapToTickEnabled="True"
|
|
|
+ Maximum="12"
|
|
|
+ Minimum="1"
|
|
|
+ Style="{StaticResource RoundThumbSlider}"
|
|
|
+ TickFrequency="1"
|
|
|
+ Value="{Binding LineWidth}">
|
|
|
+ <Slider.Resources>
|
|
|
+ <SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="#477EDE" />
|
|
|
+ <SolidColorBrush x:Key="{x:Static SystemColors.ControlDarkDarkBrushKey}" Color="#E2E3E6" />
|
|
|
+ </Slider.Resources>
|
|
|
+ </Slider>
|
|
|
+
|
|
|
+ <Border
|
|
|
+ Grid.Column="1"
|
|
|
+ Width="80"
|
|
|
+ Height="32"
|
|
|
+
|
|
|
+ BorderBrush="#E2E3E6"
|
|
|
+ BorderThickness="0">
|
|
|
+ <Grid>
|
|
|
+ <ComboBox
|
|
|
+
|
|
|
+ Name="BorderDropBox"
|
|
|
+ Padding="10,10,0,0"
|
|
|
+ Background="Transparent"
|
|
|
+ BorderBrush="#FFE2E3E6"
|
|
|
+ BorderThickness="1">
|
|
|
+ <ComboBox.ItemContainerStyle>
|
|
|
+ <Style TargetType="{x:Type ComboBoxItem}">
|
|
|
+ <Setter Property="Padding" Value="10,0,0,0" />
|
|
|
+ </Style>
|
|
|
+ </ComboBox.ItemContainerStyle>
|
|
|
+ <ComboBoxItem
|
|
|
+ Height="32"
|
|
|
+ VerticalContentAlignment="Center"
|
|
|
+ Content="1"
|
|
|
+ Template="{StaticResource comboxitem}" />
|
|
|
+ <ComboBoxItem
|
|
|
+ Height="32"
|
|
|
+ VerticalContentAlignment="Center"
|
|
|
+ Content="3"
|
|
|
+ Template="{StaticResource comboxitem}" />
|
|
|
+ <ComboBoxItem
|
|
|
+ Height="32"
|
|
|
+ VerticalContentAlignment="Center"
|
|
|
+ Content="6"
|
|
|
+ Template="{StaticResource comboxitem}" />
|
|
|
+ <ComboBoxItem
|
|
|
+ Height="32"
|
|
|
+ VerticalContentAlignment="Center"
|
|
|
+ Content="9"
|
|
|
+ Template="{StaticResource comboxitem}" />
|
|
|
+ <ComboBoxItem
|
|
|
+ Height="32"
|
|
|
+ VerticalContentAlignment="Center"
|
|
|
+ Content="12"
|
|
|
+ Template="{StaticResource comboxitem}" />
|
|
|
+ <i:Interaction.Triggers>
|
|
|
+ <i:EventTrigger EventName="SelectionChanged">
|
|
|
+ <i:InvokeCommandAction Command="{Binding ThicknessChangedCommand}" CommandParameter="{Binding ElementName=BorderDropBox, Path=SelectedItem}" />
|
|
|
+ </i:EventTrigger>
|
|
|
+ </i:Interaction.Triggers>
|
|
|
+ </ComboBox>
|
|
|
+ <TextBox
|
|
|
+ Height="20"
|
|
|
+ Margin="10,0,35,0"
|
|
|
+ VerticalAlignment="Center"
|
|
|
+ Background="White"
|
|
|
+ BorderThickness="0"
|
|
|
+ FontFamily="Segoe UI"
|
|
|
+ FontSize="14"
|
|
|
+ IsReadOnly="True"
|
|
|
+ Text="{Binding ElementName=BorderSlider, Path=Value}"
|
|
|
+ TextAlignment="Left" />
|
|
|
+ </Grid>
|
|
|
+ </Border>
|
|
|
+ </Grid>
|
|
|
+ </Grid>
|
|
|
+
|
|
|
+ <Border
|
|
|
+ Width="228"
|
|
|
+ Height="32"
|
|
|
+ Margin="0,12,0,0"
|
|
|
+ BorderBrush="#FFE2E3E6"
|
|
|
+ BorderThickness="1"
|
|
|
+ Visibility="{Binding IsMultiSelected,Converter={StaticResource InvertBoolToVisibleConvert}}"
|
|
|
+ >
|
|
|
+ <Grid Name="ToolGrid">
|
|
|
+ <Grid.ColumnDefinitions>
|
|
|
+ <ColumnDefinition Width="40.5" />
|
|
|
+ <ColumnDefinition Width="40.5" />
|
|
|
+ <ColumnDefinition Width="40.5" />
|
|
|
+ <ColumnDefinition Width="40.5" />
|
|
|
+ <ColumnDefinition Width="40.5" />
|
|
|
+ </Grid.ColumnDefinitions>
|
|
|
+
|
|
|
+
|
|
|
+ <ToggleButton
|
|
|
+ Name="HookShapeBtn"
|
|
|
+ Width="40.5"
|
|
|
+ Background="Transparent"
|
|
|
+ BorderThickness="0"
|
|
|
+ Click="SharpsBtn_Click"
|
|
|
+ Command="{Binding SharpsTypeCommand}"
|
|
|
+ CommandParameter="{Binding ElementName=HookShapeBtn, Path=Tag}"
|
|
|
+ Tag="HookShape">
|
|
|
+ <Path
|
|
|
+ Width="15"
|
|
|
+ Height="13"
|
|
|
+ HorizontalAlignment="Center"
|
|
|
+ VerticalAlignment="Center"
|
|
|
+ StrokeThickness="1.6"
|
|
|
+ StrokeLineJoin="Round"
|
|
|
+ Stroke="#616469">
|
|
|
+ <Path.Data>M0.599976 7.0286L5.57775 11.8L13.4 1.40002
|
|
|
+ </Path.Data>
|
|
|
+ </Path>
|
|
|
+ </ToggleButton>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <ToggleButton
|
|
|
+ Name="ForkShapeBtn"
|
|
|
+ Grid.Column="1"
|
|
|
+ Width="40.5"
|
|
|
+ Margin="0,0,0,0"
|
|
|
+ Background="Transparent"
|
|
|
+ BorderThickness="0"
|
|
|
+ Click="SharpsBtn_Click"
|
|
|
+ Command="{Binding SharpsTypeCommand}"
|
|
|
+ CommandParameter="{Binding ElementName=ForkShapeBtn, Path=Tag}"
|
|
|
+ Tag="ForkShape">
|
|
|
+ <Path
|
|
|
+ Width="16"
|
|
|
+ Height="16"
|
|
|
+ HorizontalAlignment="Center"
|
|
|
+ VerticalAlignment="Center"
|
|
|
+ StrokeThickness="1.6"
|
|
|
+ StrokeLineJoin="Round"
|
|
|
+ Stroke="#616469">
|
|
|
+ <Path.Data>
|
|
|
+ M3.19995 3.20001L12.8 12.8
|
|
|
+ M12.8 3.20001L3.20005 12.8
|
|
|
+ </Path.Data>
|
|
|
+ </Path>
|
|
|
+ </ToggleButton>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <ToggleButton
|
|
|
+ Name="RectShapeBtn"
|
|
|
+ Grid.Column="2"
|
|
|
+ Width="40.5"
|
|
|
+ Background="Transparent"
|
|
|
+ BorderThickness="0"
|
|
|
+ Click="SharpsBtn_Click"
|
|
|
+ Command="{Binding SharpsTypeCommand}"
|
|
|
+ CommandParameter="{Binding ElementName=RectShapeBtn, Path=Tag}"
|
|
|
+ Tag="RectShape">
|
|
|
+ <Rectangle
|
|
|
+ Width="9.6"
|
|
|
+ Height="9.6"
|
|
|
+ StrokeThickness="1.6"
|
|
|
+ RadiusX="1.20002"
|
|
|
+ RadiusY="1.20002"
|
|
|
+ HorizontalAlignment="Center"
|
|
|
+ VerticalAlignment="Center"
|
|
|
+ Stroke="#616469" />
|
|
|
+ </ToggleButton>
|
|
|
+
|
|
|
+
|
|
|
+ <ToggleButton
|
|
|
+ Name="LineShapeBtn"
|
|
|
+ Grid.Column="3"
|
|
|
+ Width="40.5"
|
|
|
+ Background="Transparent"
|
|
|
+ BorderThickness="0"
|
|
|
+ Click="SharpsBtn_Click"
|
|
|
+ Command="{Binding SharpsTypeCommand}"
|
|
|
+ CommandParameter="{Binding ElementName=LineShapeBtn, Path=Tag}"
|
|
|
+ Tag="LineShape">
|
|
|
+ <Path
|
|
|
+ Width="14"
|
|
|
+ Height="2"
|
|
|
+ HorizontalAlignment="Center"
|
|
|
+ VerticalAlignment="Center"
|
|
|
+ StrokeThickness="1.6"
|
|
|
+ StrokeLineJoin="Round"
|
|
|
+ Stroke="#616469">
|
|
|
+ <Path.Data>
|
|
|
+ M13.4 1L0.600024 1
|
|
|
+ </Path.Data>
|
|
|
+ </Path>
|
|
|
+ </ToggleButton>
|
|
|
+
|
|
|
+ <ToggleButton
|
|
|
+ Name="DotShapeBtn"
|
|
|
+ Width="40.5"
|
|
|
+ Grid.Column="4"
|
|
|
+ Background="Transparent"
|
|
|
+ BorderThickness="0"
|
|
|
+ Click="SharpsBtn_Click"
|
|
|
+ Command="{Binding SharpsTypeCommand}"
|
|
|
+ CommandParameter="{Binding ElementName=DotShapeBtn, Path=Tag}"
|
|
|
+ Tag="DotShape">
|
|
|
+ <Ellipse
|
|
|
+ Width="4.8"
|
|
|
+ Height="4.8"
|
|
|
+ HorizontalAlignment="Center"
|
|
|
+ VerticalAlignment="Center"
|
|
|
+ Fill="#616469" />
|
|
|
+ </ToggleButton>
|
|
|
+ </Grid>
|
|
|
+ </Border>
|
|
|
+ </StackPanel>
|
|
|
</Grid>
|
|
|
</UserControl>
|