misc: enhance Switch.
This commit is contained in:
parent
b4d5a3f932
commit
142abbf3da
@ -15,6 +15,7 @@
|
|||||||
<Setter Property="VerticalAlignment" Value="Center" />
|
<Setter Property="VerticalAlignment" Value="Center" />
|
||||||
<Setter Property="HorizontalContentAlignment" Value="Left" />
|
<Setter Property="HorizontalContentAlignment" Value="Left" />
|
||||||
<Setter Property="VerticalContentAlignment" Value="Center" />
|
<Setter Property="VerticalContentAlignment" Value="Center" />
|
||||||
|
<Setter Property="Cursor" Value="Hand" />
|
||||||
<Setter Property="FocusAdorner">
|
<Setter Property="FocusAdorner">
|
||||||
<FocusAdornerTemplate>
|
<FocusAdornerTemplate>
|
||||||
<Border Theme="{DynamicResource AdornerLayerBorder}"
|
<Border Theme="{DynamicResource AdornerLayerBorder}"
|
||||||
@ -66,7 +67,7 @@
|
|||||||
Width="{DynamicResource ToggleSwitchIndicatorDefaultWidth}"
|
Width="{DynamicResource ToggleSwitchIndicatorDefaultWidth}"
|
||||||
Height="{DynamicResource ToggleSwitchIndicatorDefaultWidth}"
|
Height="{DynamicResource ToggleSwitchIndicatorDefaultWidth}"
|
||||||
HorizontalAlignment="Left">
|
HorizontalAlignment="Left">
|
||||||
<Grid
|
<Panel
|
||||||
Name="PART_MovingKnobs"
|
Name="PART_MovingKnobs"
|
||||||
Width="{DynamicResource ToggleSwitchIndicatorDefaultWidth}"
|
Width="{DynamicResource ToggleSwitchIndicatorDefaultWidth}"
|
||||||
Height="{DynamicResource ToggleSwitchIndicatorDefaultWidth}"
|
Height="{DynamicResource ToggleSwitchIndicatorDefaultWidth}"
|
||||||
@ -107,7 +108,7 @@
|
|||||||
</Style>
|
</Style>
|
||||||
</Arc.Styles>
|
</Arc.Styles>
|
||||||
</Arc>
|
</Arc>
|
||||||
</Grid>
|
</Panel>
|
||||||
</Canvas>
|
</Canvas>
|
||||||
</Border>
|
</Border>
|
||||||
|
|
||||||
@ -205,7 +206,7 @@
|
|||||||
<Setter Property="Width" Value="{DynamicResource ToggleSwitchIndicatorSmallWidth}" />
|
<Setter Property="Width" Value="{DynamicResource ToggleSwitchIndicatorSmallWidth}" />
|
||||||
<Setter Property="Height" Value="{DynamicResource ToggleSwitchIndicatorSmallWidth}" />
|
<Setter Property="Height" Value="{DynamicResource ToggleSwitchIndicatorSmallWidth}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^ /template/ Grid#PART_MovingKnobs">
|
<Style Selector="^ /template/ Panel#PART_MovingKnobs">
|
||||||
<Setter Property="Width" Value="{DynamicResource ToggleSwitchIndicatorSmallWidth}" />
|
<Setter Property="Width" Value="{DynamicResource ToggleSwitchIndicatorSmallWidth}" />
|
||||||
<Setter Property="Height" Value="{DynamicResource ToggleSwitchIndicatorSmallWidth}" />
|
<Setter Property="Height" Value="{DynamicResource ToggleSwitchIndicatorSmallWidth}" />
|
||||||
<Setter Property="Margin" Value="{DynamicResource ToggleSwitchIndicatorSmallMargin}" />
|
<Setter Property="Margin" Value="{DynamicResource ToggleSwitchIndicatorSmallMargin}" />
|
||||||
@ -223,7 +224,7 @@
|
|||||||
<Setter Property="Width" Value="{DynamicResource ToggleSwitchIndicatorLargeWidth}" />
|
<Setter Property="Width" Value="{DynamicResource ToggleSwitchIndicatorLargeWidth}" />
|
||||||
<Setter Property="Height" Value="{DynamicResource ToggleSwitchIndicatorLargeWidth}" />
|
<Setter Property="Height" Value="{DynamicResource ToggleSwitchIndicatorLargeWidth}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^ /template/ Grid#PART_MovingKnobs">
|
<Style Selector="^ /template/ Panel#PART_MovingKnobs">
|
||||||
<Setter Property="Width" Value="{DynamicResource ToggleSwitchIndicatorLargeWidth}" />
|
<Setter Property="Width" Value="{DynamicResource ToggleSwitchIndicatorLargeWidth}" />
|
||||||
<Setter Property="Height" Value="{DynamicResource ToggleSwitchIndicatorLargeWidth}" />
|
<Setter Property="Height" Value="{DynamicResource ToggleSwitchIndicatorLargeWidth}" />
|
||||||
<Setter Property="Margin" Value="{DynamicResource ToggleSwitchIndicatorLargeMargin}" />
|
<Setter Property="Margin" Value="{DynamicResource ToggleSwitchIndicatorLargeMargin}" />
|
||||||
@ -246,7 +247,6 @@
|
|||||||
<Border
|
<Border
|
||||||
Name="SwitchBackgroundBorder"
|
Name="SwitchBackgroundBorder"
|
||||||
Background="{TemplateBinding Background}"
|
Background="{TemplateBinding Background}"
|
||||||
Cursor="Hand"
|
|
||||||
Width="{DynamicResource ToggleSwitchDefaultWidth}"
|
Width="{DynamicResource ToggleSwitchDefaultWidth}"
|
||||||
Height="{DynamicResource ToggleSwitchDefaultHeight}"
|
Height="{DynamicResource ToggleSwitchDefaultHeight}"
|
||||||
BorderBrush="{DynamicResource ToggleSwitchDefaultBorderBrush}"
|
BorderBrush="{DynamicResource ToggleSwitchDefaultBorderBrush}"
|
||||||
@ -266,7 +266,7 @@
|
|||||||
Width="{DynamicResource ToggleSwitchIndicatorDefaultWidth}"
|
Width="{DynamicResource ToggleSwitchIndicatorDefaultWidth}"
|
||||||
Height="{DynamicResource ToggleSwitchIndicatorDefaultWidth}"
|
Height="{DynamicResource ToggleSwitchIndicatorDefaultWidth}"
|
||||||
HorizontalAlignment="Left">
|
HorizontalAlignment="Left">
|
||||||
<Grid
|
<Panel
|
||||||
Name="PART_MovingKnobs"
|
Name="PART_MovingKnobs"
|
||||||
Width="{DynamicResource ToggleSwitchIndicatorDefaultWidth}"
|
Width="{DynamicResource ToggleSwitchIndicatorDefaultWidth}"
|
||||||
Height="{DynamicResource ToggleSwitchIndicatorDefaultWidth}"
|
Height="{DynamicResource ToggleSwitchIndicatorDefaultWidth}"
|
||||||
@ -307,7 +307,7 @@
|
|||||||
</Style>
|
</Style>
|
||||||
</Arc.Styles>
|
</Arc.Styles>
|
||||||
</Arc>
|
</Arc>
|
||||||
</Grid>
|
</Panel>
|
||||||
</Canvas>
|
</Canvas>
|
||||||
<ContentPresenter
|
<ContentPresenter
|
||||||
Name="PART_OnContentPresenter"
|
Name="PART_OnContentPresenter"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user