Files
HandyControl/Net40/HandyControl_Net40/Themes/Styles/Base/RadioGroupBaseStyle.xaml
T
2019-01-21 11:12:38 +08:00

26 lines
1.4 KiB
XML

<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="clr-namespace:HandyControl.Controls"
xmlns:tools="clr-namespace:HandyControl.Tools">
<ItemsPanelTemplate x:Key="RadioGroupHorizontalItemsPanelTemplate">
<UniformGrid FocusVisualStyle="{x:Null}" Rows="1"/>
</ItemsPanelTemplate>
<ItemsPanelTemplate x:Key="RadioGroupVerticalItemsPanelTemplate">
<UniformGrid FocusVisualStyle="{x:Null}" Columns="1"/>
</ItemsPanelTemplate>
<Style x:Key="RadioGroupBaseStyle" TargetType="controls:RadioGroup">
<Setter Property="ItemsPanel" Value="{StaticResource RadioGroupHorizontalItemsPanelTemplate}"/>
<Setter Property="controls:TitleElement.BorderBrush" Value="{DynamicResource PrimaryBrush}"/>
<Setter Property="controls:TitleElement.Background" Value="{DynamicResource DefaultBrush}"/>
<Setter Property="controls:TitleElement.Foreground" Value="{DynamicResource PrimaryBrush}"/>
<Style.Triggers>
<Trigger Property="Orientation" Value="Vertical">
<Setter Property="ItemsPanel" Value="{StaticResource RadioGroupVerticalItemsPanelTemplate}"/>
</Trigger>
</Style.Triggers>
</Style>
</ResourceDictionary>