|
@@ -0,0 +1,68 @@
|
|
|
+<UserControl x:Class="compdfkit_tools.Common.CPDFLineStyleUI"
|
|
|
+ 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:compdfkit_tools.Common"
|
|
|
+ mc:Ignorable="d"
|
|
|
+ d:DesignHeight="70" d:DesignWidth="260">
|
|
|
+ <UserControl.Resources>
|
|
|
+ <Style x:Key="LineRadioButton" TargetType="{x:Type RadioButton}">
|
|
|
+ <Setter Property="HorizontalAlignment" Value="Left"></Setter>
|
|
|
+ <Setter Property="VerticalAlignment" Value="Center"></Setter>
|
|
|
+ <Setter Property="Height" Value="20"></Setter>
|
|
|
+ <Setter Property="Width" Value="200"></Setter>
|
|
|
+ <Setter Property="Template">
|
|
|
+ <Setter.Value>
|
|
|
+ <ControlTemplate TargetType="{x:Type RadioButton}">
|
|
|
+ <Grid>
|
|
|
+ <Grid.ColumnDefinitions>
|
|
|
+ <ColumnDefinition Width="20"></ColumnDefinition>
|
|
|
+ <ColumnDefinition></ColumnDefinition>
|
|
|
+ </Grid.ColumnDefinitions>
|
|
|
+ <Grid Grid.Column="0">
|
|
|
+ <Border x:Name="BackgroundBorder" CornerRadius="20" BorderThickness="2" BorderBrush="#000000" Background="Transparent">
|
|
|
+ <Ellipse Name="CheckedEllipse" Height="10" Width="10" Fill="#000000" Visibility="Collapsed"></Ellipse>
|
|
|
+ </Border>
|
|
|
+ </Grid>
|
|
|
+ <ContentPresenter Grid.Column="1"/>
|
|
|
+ </Grid>
|
|
|
+ <ControlTemplate.Triggers>
|
|
|
+ <Trigger Property="IsMouseOver" Value="True">
|
|
|
+ <Setter TargetName="BackgroundBorder" Property="BorderBrush" Value="#477EDE"></Setter>
|
|
|
+ </Trigger>
|
|
|
+
|
|
|
+ <Trigger Property="IsPressed" Value="True">
|
|
|
+ <Setter TargetName="BackgroundBorder" Property="BorderBrush" Value="#477EDE"></Setter>
|
|
|
+ <Setter TargetName="BackgroundBorder" Property="Background" Value="#87CEFA"></Setter>
|
|
|
+ </Trigger>
|
|
|
+
|
|
|
+ <Trigger Property="IsChecked" Value="True">
|
|
|
+ <Setter TargetName="CheckedEllipse" Property="Visibility" Value="Visible"></Setter>
|
|
|
+ </Trigger>
|
|
|
+ </ControlTemplate.Triggers>
|
|
|
+ </ControlTemplate>
|
|
|
+ </Setter.Value>
|
|
|
+ </Setter>
|
|
|
+ </Style>
|
|
|
+ </UserControl.Resources>
|
|
|
+ <Grid>
|
|
|
+ <Grid.RowDefinitions>
|
|
|
+ <RowDefinition></RowDefinition>
|
|
|
+ <RowDefinition></RowDefinition>
|
|
|
+ </Grid.RowDefinitions>
|
|
|
+ <RadioButton Tag="Solid" IsChecked="True" Grid.Row="0" Style="{StaticResource LineRadioButton}" VerticalAlignment="Center" GroupName="LineStyleGroup" Margin="16,0,0,0" Click="RadioButton_Click">
|
|
|
+ <Line Name="SolidLineControl" Margin="10,0,0,0" Grid.Column="1" Stroke="#000000" StrokeThickness="1" X1="0" Y1="0" X2="112" Y2="0" VerticalAlignment="Center"></Line>
|
|
|
+ </RadioButton>
|
|
|
+ <Grid Grid.Row="1">
|
|
|
+ <Grid.ColumnDefinitions>
|
|
|
+ <ColumnDefinition Width="2*"></ColumnDefinition>
|
|
|
+ <ColumnDefinition Width="1*"></ColumnDefinition>
|
|
|
+ </Grid.ColumnDefinitions>
|
|
|
+ <RadioButton x:Name="DashRadioButton" Tag="Dash" Margin="16,0,0,0" Style="{StaticResource LineRadioButton}" GroupName="LineStyleGroup" Click="RadioButton_Click">
|
|
|
+ <Line Name="DashLineControl" Margin="10,0,0,0" Grid.Row="1" Grid.Column="1" Stroke="#000000" StrokeThickness="2" X1="0" Y1="0" X2="112" Y2="0" VerticalAlignment="Center" StrokeDashArray="0,1,1"></Line>
|
|
|
+ </RadioButton>
|
|
|
+ <local:NumericUpDownControl x:Name="NumericUpDownControl" Text="{Binding DashSpacing, Mode=TwoWay}" Grid.Column="1" Width="72" Height="28" Unit="pt" Minimum="1" Maxium="100" IsEnabled="{Binding ElementName=DashRadioButton, Path=IsChecked}"></local:NumericUpDownControl>
|
|
|
+ </Grid>
|
|
|
+ </Grid>
|
|
|
+</UserControl>
|