feat: add :pointerover and :pressed style
This commit is contained in:
parent
c8e58e3dbf
commit
6af2d9008d
@ -172,9 +172,14 @@
|
||||
<ControlTheme x:Key="ButtonToggleSwitch" BasedOn="{StaticResource {x:Type ToggleSwitch}}" TargetType="ToggleSwitch">
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate TargetType="ToggleSwitch">
|
||||
<Border
|
||||
Name="Background"
|
||||
Cursor="Hand"
|
||||
Padding="8"
|
||||
Background="{TemplateBinding Background}"
|
||||
CornerRadius="3">
|
||||
<Grid
|
||||
Background="Transparent"
|
||||
Cursor="Hand"
|
||||
ColumnDefinitions="Auto">
|
||||
<Grid x:Name="PART_SwitchKnob" />
|
||||
<Grid x:Name="PART_MovingKnobs" />
|
||||
@ -189,8 +194,15 @@
|
||||
Content="{TemplateBinding OffContent}"
|
||||
ContentTemplate="{TemplateBinding OffContentTemplate}" />
|
||||
</Grid>
|
||||
</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 x:Key="SimpleToggleSwitch" BasedOn="{StaticResource {x:Type ToggleSwitch}}" TargetType="ToggleSwitch">
|
||||
|
Loading…
x
Reference in New Issue
Block a user