Class ToggleSwitch
- Namespace
- Tudormobile.Wpf.Controls
- Assembly
- Tudormobile.WpfControls.dll
A Toggle Switch is a checkbox/togglebutton that uses and animated switch to change states. The 'Content' property is used to display the 'Off' state content, which can be (null). The 'OnContent' property can be used to represent the 'On' state. The default values for the content properties are 'Off' and 'On'. If the 'On' content does not exist, then the Content property is used for all states.
public class ToggleSwitch : ToggleButton, IAnimatable, ISupportInitialize, IFrameworkInputElement, IInputElement, IQueryAmbient, IAddChild, ICommandSource
- Inheritance
-
ToggleSwitch
- Implements
- Inherited Members
Properties
HasOnContent
True if there is 'OnContent' present.
public bool HasOnContent { get; set; }
Property Value
OnContent
Content for the 'On' state of the switch
public object? OnContent { get; set; }
Property Value
Methods
OnApplyTemplate()
When overridden in a derived class, is invoked whenever application code or internal processes call ApplyTemplate().
public override void OnApplyTemplate()
OnChecked(RoutedEventArgs)
Called when a ToggleButton raises a Checked event.
protected override void OnChecked(RoutedEventArgs e)
Parameters
eRoutedEventArgsThe event data for the Checked event.
OnUnchecked(RoutedEventArgs)
Called when a ToggleButton raises an Unchecked event.
protected override void OnUnchecked(RoutedEventArgs e)
Parameters
eRoutedEventArgsThe event data for the Unchecked event.