StatusSwitchElement Attach - AdarshRise/HandyControl GitHub Wiki
An attached property is intended to be used as a type of global property that is settable on any object.
StatusSwitchElement Contains
Property | Description |
CheckedElement | Gets or sets |
HideUncheckedElement | Gets or sets |
First add HandyControl NameSpace
xmlns:hc="https://handyorg.github.io/handycontrol"
Now
<ToggleButton IsChecked="True" Style="{StaticResource ToggleButtonCustom}" hc:StatusSwitchElement.HideUncheckedElement="True">
<hc:StatusSwitchElement.CheckedElement>
<Border>
<Ellipse Fill="{DynamicResource PrimaryBrush}" StrokeThickness="1" Stroke="{DynamicResource BorderBrush}"/>
</Border>
</hc:StatusSwitchElement.CheckedElement>
<Border>
<Ellipse Fill="{DynamicResource BorderBrush}" StrokeThickness="1" Stroke="{DynamicResource BorderBrush}"/>
</Border>
</ToggleButton>
StatusSwitchElement.SetHideUncheckedElement(control, True);
StatusSwitchElement.GetHideUncheckedElement(control);