123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100 |
- <ResourceDictionary
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:ctrl="http://OpenSEMI.Ctrlib.com/presentation"
- mc:Ignorable="d">
- <Style x:Key="Button_RadioButton" TargetType="{x:Type RadioButton}">
- <Setter Property="VerticalContentAlignment"
- Value="Center" />
- <Setter Property="HorizontalContentAlignment"
- Value="Center" />
- <Setter Property="Background"
- Value="LightGray" />
- <Setter Property="BorderBrush"
- Value="White" />
- <Setter Property="BorderThickness"
- Value="0" />
- <Setter Property="Padding"
- Value="10,0" />
- <Setter Property="Cursor" Value="Hand"/>
- <Setter Property="Foreground" Value="White"/>
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type RadioButton}">
- <Grid x:Name="GrdMain">
- <Border x:Name="BdrBack"
- BorderBrush="{TemplateBinding BorderBrush}"
- BorderThickness="{TemplateBinding BorderThickness}"
- Background="{StaticResource Button_BG_Unable}"
- CornerRadius="5"
- />
- <Border x:Name="BdrHover"
- BorderBrush="Transparent"
- BorderThickness="{TemplateBinding BorderThickness}"
- Background="Gray"
-
- Opacity="0" />
- <Border x:Name="BdrChecked"
- BorderBrush="{TemplateBinding BorderBrush}"
- BorderThickness="{TemplateBinding BorderThickness}"
- Background="{StaticResource Button_BG}"
-
- CornerRadius="5"
- Visibility="Collapsed" />
- <ContentPresenter x:Name="Content"
- VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
- HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
- Margin="{TemplateBinding Padding}"
- Content="{TemplateBinding Content}"
- TextBlock.Foreground="{TemplateBinding Foreground}" />
- </Grid>
- <ControlTemplate.Triggers>
- <MultiDataTrigger>
-
- </MultiDataTrigger>
- <MultiDataTrigger>
- <MultiDataTrigger.Conditions>
- <Condition Binding="{Binding IsMouseOver,RelativeSource={RelativeSource Self}}"
- Value="True" />
- <Condition Binding="{Binding IsChecked,RelativeSource={RelativeSource Self}}"
- Value="False" />
- </MultiDataTrigger.Conditions>
- <MultiDataTrigger.EnterActions>
- <BeginStoryboard>
- <Storyboard>
- <DoubleAnimation Storyboard.TargetName="BdrHover"
- Storyboard.TargetProperty="Opacity"
- To="0.2"
- Duration="0:0:0.3" />
- </Storyboard>
- </BeginStoryboard>
- </MultiDataTrigger.EnterActions>
- <MultiDataTrigger.ExitActions>
- <BeginStoryboard>
- <Storyboard>
- <DoubleAnimation Storyboard.TargetName="BdrHover"
- Storyboard.TargetProperty="Opacity"
- Duration="0:0:0.3" />
- </Storyboard>
- </BeginStoryboard>
- </MultiDataTrigger.ExitActions>
- </MultiDataTrigger>
- <Trigger Property="IsChecked"
- Value="True">
-
- <Setter TargetName="BdrChecked"
- Property="Visibility"
- Value="Visible" />
- <Setter Property="IsEnabled" Value="False"/>
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- </ResourceDictionary>
|