34 lines
1.9 KiB
XML
34 lines
1.9 KiB
XML
<ResourceDictionary
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:controls="clr-namespace:WPFDark.Controls"
|
|
xmlns:wpf="clr-namespace:WPFDark"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
|
<Style TargetType="{x:Type controls:BiaToggleSwitch}">
|
|
<Setter Property="EnabledLabel" Value="Enabled" />
|
|
<Setter Property="DisabledLabel" Value="Disabled" />
|
|
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type controls:BiaToggleSwitch}">
|
|
<controls:BiaUniformGrid
|
|
ColumnSpacing="1.0"
|
|
Columns="2"
|
|
CornerRadius="{x:Static wpf:Boxes.BasicCornerRadius}"
|
|
RowSpacing="1.0">
|
|
<controls:BiaToggleButton
|
|
Behavior="{x:Static controls:BiaToggleButtonBehavior.RadioButton}"
|
|
Content="{Binding EnabledLabel, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}"
|
|
CornerRadius="0.0"
|
|
IsChecked="{Binding IsChecked, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" />
|
|
|
|
<controls:BiaToggleButton
|
|
Behavior="{x:Static controls:BiaToggleButtonBehavior.RadioButton}"
|
|
Content="{Binding DisabledLabel, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}"
|
|
CornerRadius="0.0"
|
|
IsChecked="{Binding IsChecked, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}, Converter={x:Static controls:BiaToggleSwitch.InverseConverter}}" />
|
|
</controls:BiaUniformGrid>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
</ResourceDictionary> |