123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337 |
- <UserControl
- x:Class="PDF_Master.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_Master.CustomControl.CompositeControl"
- xmlns:cus="clr-namespace:PDF_Master.CustomControl"
- xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
- xmlns:Convert="clr-namespace:PDF_Master.DataConvert"
- xmlns:DashConvert="clr-namespace:PDF_Master.ViewModels.PropertyPanel.AnnotPanel"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:local="clr-namespace:PDF_Master.Views.FillAndSign.PropertyPanel"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:prism="http://prismlibrary.com/"
- d:DesignHeight="450"
- d:DesignWidth="260"
- prism:ViewModelLocator.AutoWireViewModel="True"
-
- mc:Ignorable="d">
- <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"/>
- <Convert:UnVisivleConvert x:Key="unVisibleConvert"/>
- </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 ShapeType}"/>
- <Border
- x:Name="shapeBarder"
- Width="228"
- Height="100"
- Margin="0,8,0,0"
- Background="White"
- BorderBrush="#DDDDDD"
- BorderThickness="1"
- CornerRadius="2"
- Visibility="{Binding IsMultiSelected,Converter={StaticResource InvertBoolToVisibleConvert}}"
- >
- <Grid HorizontalAlignment="Center" VerticalAlignment="Center">
- <Path
- Name="SharpPath"
-
- 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" Margin="0,0,0,12"/>
- <CompositeControl:SlidContent x:Name="layerThick" HorizontalAlignment="Right" InitValue="{Binding FillOpacity, Mode=OneWay}">
- <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" ItemSource="{Binding ShapeColorItems}" UIColor="{Binding ShapeColorColor,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"/>
- </Grid>
- <Grid Margin="0,18,0,0" Visibility="Collapsed">
- <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>
- <i:Interaction.Triggers>
- <i:EventTrigger EventName="ValueChanged">
- <i:InvokeCommandAction Command="{Binding SelectedLineWidthValueCommand}" CommandParameter="{Binding ElementName=BorderSlider,Path=Value}"/>
- </i:EventTrigger>
- </i:Interaction.Triggers>
- </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>
- <StackPanel Margin="0,18,0,0" Visibility="Collapsed"><!--Visibility="{Binding IsSelected,Converter={StaticResource InvertBoolToVisibleConvert}}"-->
- <TextBlock Text="Fill Type" VerticalAlignment="Center"/>
- <Border
- Width="228"
- Height="32"
- Margin="0,10,0,0"
- BorderBrush="#FFE2E3E6"
- BorderThickness="1"
-
- >
- <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"
- IsChecked="{Binding HookIsChecked}"
- 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"
- IsChecked="{Binding ForkIsChecked}"
- 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"
- IsChecked="{Binding RectIsChecked}"
-
- 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"
- IsChecked="{Binding LineIsChecked}"
- 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"
- IsChecked="{Binding DotIsChecked}"
- 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>
- </StackPanel>
- </Grid>
- </UserControl>
|