misc: swap SimpleToggleSwitch & ButtonToggleSwitch.
This commit is contained in:
parent
266fdade35
commit
b4d5a3f932
@ -234,51 +234,6 @@
|
|||||||
</Style>
|
</Style>
|
||||||
</ControlTheme>
|
</ControlTheme>
|
||||||
|
|
||||||
<ControlTheme
|
|
||||||
x:Key="ButtonToggleSwitch"
|
|
||||||
BasedOn="{StaticResource {x:Type ToggleSwitch}}"
|
|
||||||
TargetType="ToggleSwitch">
|
|
||||||
<Setter Property="Padding" Value="8" />
|
|
||||||
<Setter Property="CornerRadius" Value="3" />
|
|
||||||
<Setter Property="Background" Value="Transparent" />
|
|
||||||
<Setter Property="FocusAdorner">
|
|
||||||
<FocusAdornerTemplate>
|
|
||||||
<Border Theme="{StaticResource AdornerLayerBorder}" />
|
|
||||||
</FocusAdornerTemplate>
|
|
||||||
</Setter>
|
|
||||||
<Setter Property="Template">
|
|
||||||
<ControlTemplate TargetType="ToggleSwitch">
|
|
||||||
<Border
|
|
||||||
Name="Background"
|
|
||||||
Padding="{TemplateBinding Padding}"
|
|
||||||
Background="{TemplateBinding Background}"
|
|
||||||
CornerRadius="{TemplateBinding CornerRadius}"
|
|
||||||
Cursor="Hand">
|
|
||||||
<Panel>
|
|
||||||
<Panel Name="PART_SwitchKnob" />
|
|
||||||
<Panel Name="PART_MovingKnobs" />
|
|
||||||
<ContentPresenter
|
|
||||||
Name="PART_OnContentPresenter"
|
|
||||||
Margin="{DynamicResource ToggleSwitchOnContentMargin}"
|
|
||||||
Content="{TemplateBinding OnContent}"
|
|
||||||
ContentTemplate="{TemplateBinding OnContentTemplate}" />
|
|
||||||
<ContentPresenter
|
|
||||||
Name="PART_OffContentPresenter"
|
|
||||||
Margin="{DynamicResource ToggleSwitchOnContentMargin}"
|
|
||||||
Content="{TemplateBinding OffContent}"
|
|
||||||
ContentTemplate="{TemplateBinding OffContentTemplate}" />
|
|
||||||
</Panel>
|
|
||||||
</Border>
|
|
||||||
</ControlTemplate>
|
|
||||||
</Setter>
|
|
||||||
<Style Selector="^:pointerover">
|
|
||||||
<Setter Property="Background" Value="{DynamicResource ButtonDefaultPointeroverBackground}" />
|
|
||||||
</Style>
|
|
||||||
<Style Selector="^:pressed">
|
|
||||||
<Setter Property="Background" Value="{DynamicResource ButtonDefaultPressedBackground}" />
|
|
||||||
</Style>
|
|
||||||
</ControlTheme>
|
|
||||||
|
|
||||||
<ControlTheme
|
<ControlTheme
|
||||||
x:Key="SimpleToggleSwitch"
|
x:Key="SimpleToggleSwitch"
|
||||||
BasedOn="{StaticResource {x:Type ToggleSwitch}}"
|
BasedOn="{StaticResource {x:Type ToggleSwitch}}"
|
||||||
@ -391,4 +346,49 @@
|
|||||||
</Style>
|
</Style>
|
||||||
</Style>
|
</Style>
|
||||||
</ControlTheme>
|
</ControlTheme>
|
||||||
|
|
||||||
|
<ControlTheme
|
||||||
|
x:Key="ButtonToggleSwitch"
|
||||||
|
BasedOn="{StaticResource {x:Type ToggleSwitch}}"
|
||||||
|
TargetType="ToggleSwitch">
|
||||||
|
<Setter Property="Padding" Value="8" />
|
||||||
|
<Setter Property="CornerRadius" Value="3" />
|
||||||
|
<Setter Property="Background" Value="Transparent" />
|
||||||
|
<Setter Property="FocusAdorner">
|
||||||
|
<FocusAdornerTemplate>
|
||||||
|
<Border Theme="{StaticResource AdornerLayerBorder}" />
|
||||||
|
</FocusAdornerTemplate>
|
||||||
|
</Setter>
|
||||||
|
<Setter Property="Template">
|
||||||
|
<ControlTemplate TargetType="ToggleSwitch">
|
||||||
|
<Border
|
||||||
|
Name="Background"
|
||||||
|
Padding="{TemplateBinding Padding}"
|
||||||
|
Background="{TemplateBinding Background}"
|
||||||
|
CornerRadius="{TemplateBinding CornerRadius}"
|
||||||
|
Cursor="Hand">
|
||||||
|
<Panel>
|
||||||
|
<Panel Name="PART_SwitchKnob" />
|
||||||
|
<Panel Name="PART_MovingKnobs" />
|
||||||
|
<ContentPresenter
|
||||||
|
Name="PART_OnContentPresenter"
|
||||||
|
Margin="{DynamicResource ToggleSwitchOnContentMargin}"
|
||||||
|
Content="{TemplateBinding OnContent}"
|
||||||
|
ContentTemplate="{TemplateBinding OnContentTemplate}" />
|
||||||
|
<ContentPresenter
|
||||||
|
Name="PART_OffContentPresenter"
|
||||||
|
Margin="{DynamicResource ToggleSwitchOnContentMargin}"
|
||||||
|
Content="{TemplateBinding OffContent}"
|
||||||
|
ContentTemplate="{TemplateBinding OffContentTemplate}" />
|
||||||
|
</Panel>
|
||||||
|
</Border>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter>
|
||||||
|
<Style Selector="^:pointerover">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource ButtonDefaultPointeroverBackground}" />
|
||||||
|
</Style>
|
||||||
|
<Style Selector="^:pressed">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource ButtonDefaultPressedBackground}" />
|
||||||
|
</Style>
|
||||||
|
</ControlTheme>
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
Loading…
x
Reference in New Issue
Block a user