123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211 |
- <UserControl x:Class="PDF_Office.Views.PropertyPanel.AnnotPanel.SharpsAnnotProperty"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:local="clr-namespace:PDF_Office.Views.PropertyPanel.AnnotPanel"
- xmlns:cus="clr-namespace:PDF_Office.CustomControl"
- xmlns:CompositeControl="clr-namespace:PDF_Office.CustomControl.CompositeControl"
- xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
- xmlns:prism="http://prismlibrary.com/"
- prism:ViewModelLocator.AutoWireViewModel="True"
- xmlns:Convert="clr-namespace:PDF_Office.DataConvert"
- xmlns:DashConvert="clr-namespace:PDF_Office.ViewModels.PropertyPanel.AnnotPanel"
- mc:Ignorable="d"
- d:DesignHeight="450" d:DesignWidth="800">
- <UserControl.Resources>
- <ResourceDictionary>
- <ResourceDictionary.MergedDictionaries>
- <ResourceDictionary Source="../../../Styles/SliderStyle.xaml"></ResourceDictionary>
- <ResourceDictionary Source="../../../Styles/CustomBtnStyle.xaml"/>
- </ResourceDictionary.MergedDictionaries>
- <Convert:ColorToBrushConverter x:Key="ColorToBrushConvert"></Convert:ColorToBrushConverter>
- <Convert:CheckToVisibleMutiConvert x:Key="CheckToVisibleMutiConvert"/>
- <DashConvert:DashStyleConverter x:Key="DashStyleConverter"/>
- <Style x:Key="line1Style" TargetType="{x:Type Line}">
- <Setter Property="Visibility">
- <Setter.Value>
- <MultiBinding Converter="{StaticResource CheckToVisibleMutiConvert}">
- <Binding ElementName="SharpRectBtn" Path="IsChecked"/>
- <Binding ElementName="SharpCircleBtn" Path="IsChecked"/>
- </MultiBinding>
- </Setter.Value>
- </Setter>
- </Style>
- <Style x:Key="line2Style" TargetType="{x:Type Line}">
- <Setter Property="Visibility">
- <Setter.Value>
- <MultiBinding Converter="{StaticResource CheckToVisibleMutiConvert}">
- <Binding ElementName="SharpCircleBtn" Path="IsChecked"/>
- <Binding ElementName="SharpArrowBtn" Path="IsChecked"/>
- </MultiBinding>
- </Setter.Value>
- </Setter>
- </Style>
- <Style x:Key="line3Style" TargetType="{x:Type Line}">
- <Setter Property="Visibility">
- <Setter.Value>
- <MultiBinding Converter="{StaticResource CheckToVisibleMutiConvert}">
- <Binding ElementName="SharpArrowBtn" Path="IsChecked"/>
- <Binding ElementName="SharpLineBtn" Path="IsChecked"/>
- </MultiBinding>
- </Setter.Value>
- </Setter>
- </Style>
- </ResourceDictionary>
- </UserControl.Resources>
- <Grid Background="#F3F3F3">
- <StackPanel>
- <TextBlock Name="AnnotTypeTitle" Text="{Binding AnnotTypeTitle}" FontFamily="SegoeUI" FontWeight="Bold" FontSize="18" LineHeight="24" HorizontalAlignment="Left" Margin="10,8,0,0" />
- <Border Width="228" Height="100" BorderThickness="1" CornerRadius="2" BorderBrush="#DDDDDD" Background="White" Margin="0,8,0,0">
- <Grid>
- <Path Name="SharpPath" Opacity="{Binding FillOpacity}" StrokeThickness="{Binding LineWidth}" Data="{Binding DataPath}"
- Stroke="{Binding SelectColor}"
- Fill="{Binding FillColor}" StrokeStartLineCap="Flat"
- StrokeDashArray="{Binding Dash,Converter={StaticResource DashStyleConverter}}"
- Width="36" Height="36" HorizontalAlignment="Center" VerticalAlignment="Center">
- <!--,Converter={StaticResource ColorToBrushConvert}-->
- </Path>
- </Grid>
- </Border>
- <Border Width="162" Height="32" Margin="0,12,0,0" BorderThickness="1" BorderBrush="#FFE2E3E6">
- <Grid Name="ToolGrid">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="40.5"></ColumnDefinition>
- <ColumnDefinition Width="40.5"></ColumnDefinition>
- <ColumnDefinition Width="40.5"></ColumnDefinition>
- <ColumnDefinition Width="40.5"></ColumnDefinition>
- </Grid.ColumnDefinitions>
- <ToggleButton Name="SharpRectBtn" Tag="Rect" Width="40.5" Background="Transparent" BorderThickness="0" Click="SharpsBtn_Click"
- Command="{Binding SharpsTypeCommand}" CommandParameter="{Binding ElementName=SharpRectBtn,Path=Tag}">
- <Rectangle HorizontalAlignment="Center" VerticalAlignment="Center" Width="16" Height="16" Stroke="#273C62"></Rectangle>
- </ToggleButton>
- <Line Name="line1" HorizontalAlignment="Left" VerticalAlignment="Center" Grid.Column="1" X1="0" Y1="0" X2="0" Y2="16" StrokeThickness="1" Stroke="#33000000">
- </Line>
- <ToggleButton Name="SharpCircleBtn" Width="40.5" Tag="Circle" Grid.Column="1" Background="Transparent" BorderThickness="0" Margin="0,0,0,0" Click="SharpsBtn_Click"
- Command="{Binding SharpsTypeCommand}" CommandParameter="{Binding ElementName=SharpCircleBtn,Path=Tag}"
- >
- <Ellipse Width="16" Height="16" Stroke="#273C62" HorizontalAlignment="Center" VerticalAlignment="Center" ></Ellipse>
- </ToggleButton>
- <Line Name="line2" HorizontalAlignment="Left" Style="{StaticResource line2Style}" VerticalAlignment="Center" Grid.Column="2" X1="0" Y1="0" X2="0" Y2="16" StrokeThickness="1" Stroke="#33000000"></Line>
- <ToggleButton Name="SharpArrowBtn" Width="40.5" Tag="Arrow" Grid.Column="2" Background="Transparent" BorderThickness="0" Click="SharpsBtn_Click"
- Command="{Binding SharpsTypeCommand}" CommandParameter="{Binding ElementName=SharpArrowBtn,Path=Tag}"
- >
- <Path HorizontalAlignment="Center" VerticalAlignment="Center" Fill="#273C62" Width="16" Height="16">
- <Path.Data>
- M13.4,2.6 L13.4,8 L12.2,8 L12.1997359,4.648 L2.02426407,14.8242641 L1.17573593,13.9757359 L11.3517359,3.799 L8,3.8 L8,2.6 L13.4,2.6 Z
- </Path.Data>
- </Path>
- </ToggleButton>
- <Line x:Name="line3" HorizontalAlignment="Left" Style="{StaticResource line3Style}" VerticalAlignment="Center" Grid.Column="3" X1="0" Y1="0" X2="0" Y2="16" StrokeThickness="1" Stroke="#33000000"></Line>
- <ToggleButton Name="SharpLineBtn" Width="40.5" Tag="Line" Grid.Column="3" Background="Transparent" BorderThickness="0" Click="SharpsBtn_Click"
- Command="{Binding SharpsTypeCommand}" CommandParameter="{Binding ElementName=SharpLineBtn,Path=Tag}"
- >
- <Polygon Width="16" Height="16" HorizontalAlignment="Center" VerticalAlignment="Center" Fill="#273C62">
- <Polygon.Points>
- 13.1757359 1.97573593 14.0242641 2.82426407 2.82426407 14.0242641 1.97573593 13.1757359
- </Polygon.Points>
- </Polygon>
- </ToggleButton>
- </Grid>
- </Border>
- <Grid Margin="0,18,0,0" x:Name="GridFill">
- <Grid.RowDefinitions>
- <RowDefinition Height="auto"/>
- <RowDefinition/>
- </Grid.RowDefinitions>
- <CompositeControl:SlidContent x:Name="layerFill" HorizontalAlignment="Right"/>
- <CompositeControl:ColorContent Grid.Row="1" x:Name="cusFillColor"/>
- </Grid>
- <Grid Margin="0,18,0,0">
- <Grid.RowDefinitions>
- <RowDefinition Height="auto"/>
- <RowDefinition/>
- </Grid.RowDefinitions>
- <CompositeControl:SlidContent x:Name="layerThick" HorizontalAlignment="Right"/>
- <CompositeControl:ColorContent Grid.Row="1" x:Name="cusColor"/>
- </Grid>
- <Grid>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="*"></ColumnDefinition>
- <ColumnDefinition Width="auto"></ColumnDefinition>
- </Grid.ColumnDefinitions>
- <Slider Name="BorderSlider" VerticalAlignment="Center" Value="{Binding LineWidth}" Margin="12,0,4,0" Minimum="1" Maximum="12" IsSelectionRangeEnabled="True" IsMoveToPointEnabled="True"
- Style="{StaticResource RoundThumbSlider}" TickFrequency="1" IsSnapToTickEnabled="True" >
- <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" BorderBrush="#E2E3E6" Width="80" Height="32" Margin="0,0,12,0" BorderThickness="0">
- <Grid>
- <ComboBox Name="BorderDropBox" BorderThickness="1" Padding="10 10 0 0" Background="Transparent" BorderBrush="#FFE2E3E6" >
- <ComboBox.ItemContainerStyle>
- <Style TargetType="{x:Type ComboBoxItem}">
- <Setter Property="Padding" Value="10 0 0 0"/>
- </Style>
- </ComboBox.ItemContainerStyle>
- <ComboBoxItem Content="1" Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}">
-
- </ComboBoxItem>
- <ComboBoxItem Content="3" Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}"/>
- <ComboBoxItem Content="6" Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}"/>
- <ComboBoxItem Content="9" Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}"/>
- <ComboBoxItem Content="12" Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}"/>
- <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 FontFamily="Segoe UI" FontSize="14" Background="White" Height="20" Margin="10,0,35,0" IsReadOnly="True"
- BorderThickness="0" VerticalAlignment="Center" TextAlignment="Left" Text="{Binding ElementName=BorderSlider,Path=Value}">
- </TextBox>
- </Grid>
- </Border>
- </Grid>
- <StackPanel x:Name="PnlLineStyle" Orientation="Horizontal" Margin="0,20,0,0">
- <cus:CustomIconToggleBtn x:Name="BtnSolidLine" Tag="Solid" Width="110" Height="32" Click="BtnLineStyle_Click"
- Command="{Binding LineStyleCommand}" CommandParameter="{Binding ElementName=BtnSolidLine,Path=Tag}"
- Style="{StaticResource ToggleBtnViewModeStyle}">
- <Border BorderBrush="Black" BorderThickness="1" Padding="8,0,8,0" Width="108" Height="30">
- <Line X1="10" Y1="15" X2="260" Y2="15" Stroke="Black" StrokeThickness="2" />
- </Border>
- </cus:CustomIconToggleBtn>
- <cus:CustomIconToggleBtn x:Name="BtnDottedLine" Tag="Dotted" Width="110" Height="32"
- Command="{Binding LineStyleCommand}" CommandParameter="{Binding ElementName=BtnDottedLine,Path=Tag}"
- Style="{StaticResource ToggleBtnViewModeStyle}" Click="BtnLineStyle_Click">
- <Border BorderBrush="Black" BorderThickness="1" Padding="8,0,8,0" Width="108" Height="30" >
- <Line X1="10" Y1="15" X2="260" Y2="15" Stroke="Black" StrokeThickness="2" StrokeDashArray="2"/>
- </Border>
- </cus:CustomIconToggleBtn>
- </StackPanel>
- </StackPanel>
- </Grid>
- </UserControl>
|