123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116 |
- <UserControl x:Class="ComPDFKit.Controls.Common.CPDFCloudStyleControl"
- 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.Controls.Common"
- mc:Ignorable="d"
- d:DesignHeight="80" 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>
- <StackPanel Margin="16,0,0,0" VerticalAlignment="Center">
- <RadioButton x:Name="rdoStreat" Tag="Streat" GroupName="Shape" Style="{StaticResource LineRadioButton}" Checked="rdoShape_Checked">
- <Rectangle Fill="Black" Height="2" Width="90" HorizontalAlignment="Left" Margin="5,0,0,0"></Rectangle>
- </RadioButton>
- <RadioButton x:Name="rdoCloud1" GroupName="Shape" IsChecked="True" Style="{StaticResource LineRadioButton}" Tag="Cloud1" Margin="0,6,0,6" Checked="rdoShape_Checked">
- <Canvas VerticalAlignment="Center">
- <Path Stroke="Black" StrokeThickness="2">
- <Path.Data>
- <PathGeometry>
- <PathFigure StartPoint="20,0">
- <ArcSegment Point="6,0" Size="3,3" SweepDirection="Counterclockwise"/>
- </PathFigure>
- <PathFigure StartPoint="34,0">
- <ArcSegment Point="20,0" Size="3,3" SweepDirection="Counterclockwise"/>
- </PathFigure>
- <PathFigure StartPoint="48,0">
- <ArcSegment Point="34,0" Size="3,3" SweepDirection="Counterclockwise"/>
- </PathFigure>
- <PathFigure StartPoint="62,0">
- <ArcSegment Point="48,0" Size="3,3" SweepDirection="Counterclockwise"/>
- </PathFigure>
- <PathFigure StartPoint="76,0">
- <ArcSegment Point="62,0" Size="3,3" SweepDirection="Counterclockwise"/>
- </PathFigure>
- <PathFigure StartPoint="90,0">
- <ArcSegment Point="76,0" Size="3,3" SweepDirection="Counterclockwise"/>
- </PathFigure>
- </PathGeometry>
- </Path.Data>
- </Path>
- </Canvas>
- </RadioButton>
- <RadioButton x:Name="rdoCloud2" Tag="Cloud2" GroupName="Shape" Style="{StaticResource LineRadioButton}" Checked="rdoShape_Checked">
- <Canvas VerticalAlignment="Center">
- <Path Stroke="Black" StrokeThickness="2" Margin="-5,0,0,0">
- <Path.Data>
- <PathGeometry>
- <PathFigure StartPoint="20,0">
- <ArcSegment Point="10,0" Size="2,2" SweepDirection="Counterclockwise"/>
- </PathFigure>
- <PathFigure StartPoint="30,0">
- <ArcSegment Point="20,0" Size="2,2" SweepDirection="Counterclockwise"/>
- </PathFigure>
- <PathFigure StartPoint="40,0">
- <ArcSegment Point="30,0" Size="2,2" SweepDirection="Counterclockwise"/>
- </PathFigure>
- <PathFigure StartPoint="50,0">
- <ArcSegment Point="40,0" Size="2,2" SweepDirection="Counterclockwise"/>
- </PathFigure>
- <PathFigure StartPoint="60,0">
- <ArcSegment Point="50,0" Size="2,2" SweepDirection="Counterclockwise"/>
- </PathFigure>
- <PathFigure StartPoint="70,0">
- <ArcSegment Point="60,0" Size="2,2" SweepDirection="Counterclockwise"/>
- </PathFigure>
- <PathFigure StartPoint="80,0">
- <ArcSegment Point="70,0" Size="2,2" SweepDirection="Counterclockwise"/>
- </PathFigure>
- <PathFigure StartPoint="90,0">
- <ArcSegment Point="80,0" Size="2,2" SweepDirection="Counterclockwise"/>
- </PathFigure>
- </PathGeometry>
- </Path.Data>
- </Path>
- </Canvas>
- </RadioButton>
- </StackPanel>
- </UserControl>
|