|
- <ResourceDictionary
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:pry="clr-namespace:BPASmartClient.CustomResource.UserControls">
-
- <!--#region 右斜边按钮-->
- <Style x:Key="BeveledRadioButtonStyle" TargetType="{x:Type RadioButton}">
- <Setter Property="FontFamily" Value="楷体" />
- <Setter Property="Width" Value="100" />
- <Setter Property="Height" Value="30" />
- <Setter Property="IsChecked" Value="False" />
- <Setter Property="FontSize" Value="13" />
- <Setter Property="Foreground" Value="#ddd" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type RadioButton}">
- <Grid x:Name="gr" SnapsToDevicePixels="True">
-
- <pry:BeveledButton
- x:Name="bb"
- FillColor="#4B8EC4"
- IsParallelogram="False"
- StrokeThickness="1" />
-
- <ContentPresenter
- x:Name="contentPresenter"
- Margin="0,0,10,0"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Content="{TemplateBinding Content}"
- ContentStringFormat="{TemplateBinding ContentStringFormat}"
- ContentTemplate="{TemplateBinding ContentTemplate}"
- Focusable="False"
- RecognizesAccessKey="True"
- SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
- </Grid>
- <ControlTemplate.Triggers>
- <Trigger Property="IsChecked" Value="False">
- <Setter TargetName="bb" Property="FillColor" Value="#55007acc" />
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <!--#endregion-->
-
- <!--#region 平行四边形按钮-->
- <Style x:Key="ParallelogramRadioButtonStyle" TargetType="{x:Type RadioButton}">
- <Setter Property="FontFamily" Value="楷体" />
- <Setter Property="Width" Value="100" />
- <Setter Property="IsChecked" Value="False" />
- <Setter Property="FontSize" Value="13" />
- <Setter Property="Foreground" Value="#ddd" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type RadioButton}">
- <Grid SnapsToDevicePixels="True">
-
- <pry:BeveledButton
- x:Name="bb"
- FillColor="#4B8EC4"
- IsParallelogram="True"
- StrokeThickness="1" />
-
- <ContentPresenter
- x:Name="contentPresenter"
- Margin="0,0,10,0"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Content="{TemplateBinding Content}"
- ContentStringFormat="{TemplateBinding ContentStringFormat}"
- ContentTemplate="{TemplateBinding ContentTemplate}"
- Focusable="False"
- RecognizesAccessKey="True"
- SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
- </Grid>
- <ControlTemplate.Triggers>
- <Trigger Property="IsChecked" Value="False">
- <Setter TargetName="bb" Property="FillColor" Value="#55007acc" />
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <!--#endregion-->
-
- </ResourceDictionary>
|