Represents a toggle switch button that can display three states: checked, unchecked, and indeterminate. This button extends RadToggleButton and provides properties to customize the content and appearance for each state, including options for setting the width and height of the track and thumb, as well as the corner radius of the track in both checked and unchecked states. It also includes animation capabilities for state transitions.
Definition
Namespace:Telerik.Windows.Controls
Assembly:Telerik.Windows.Controls.dll
Syntax:
[TelerikToolboxCategory("Buttons")]
public class RadToggleSwitchButton : RadToggleButton
Inheritance: objectRadToggleButtonRadToggleSwitchButton
Inherited Members
Constructors
Initializes a new instance of the RadToggleSwitchButton class.
public RadToggleSwitchButton()
Fields
CheckedContentProperty
DependencyProperty
Identifies the CheckedContent property.
public static readonly DependencyProperty CheckedContentProperty
CheckedContentTemplateProperty
DependencyProperty
Identifies the CheckedContentTemplate property.
public static readonly DependencyProperty CheckedContentTemplateProperty
CheckedTrackRadiusProperty
DependencyProperty
Identifies the CheckedTrackRadius property.
public static readonly DependencyProperty CheckedTrackRadiusProperty
ContentPositionProperty
DependencyProperty
Identifies the ContentPosition property.
public static readonly DependencyProperty ContentPositionProperty
ThumbHeightProperty
DependencyProperty
Identifies the ThumbHeight property.
public static readonly DependencyProperty ThumbHeightProperty
ThumbWidthProperty
DependencyProperty
Identifies the ThumbWidth property.
public static readonly DependencyProperty ThumbWidthProperty
TrackHeightProperty
DependencyProperty
Identifies the TrackHeight property.
public static readonly DependencyProperty TrackHeightProperty
TrackWidthProperty
DependencyProperty
Identifies the TrackWidth property.
public static readonly DependencyProperty TrackWidthProperty
UncheckedContentProperty
DependencyProperty
Identifies the UncheckedContent property.
public static readonly DependencyProperty UncheckedContentProperty
UncheckedContentTemplateProperty
DependencyProperty
Identifies the UncheckedContentTemplate property.
public static readonly DependencyProperty UncheckedContentTemplateProperty
UncheckedTrackRadiusProperty
DependencyProperty
Identifies the UncheckedTrackRadius property.
public static readonly DependencyProperty UncheckedTrackRadiusProperty
Properties
Gets or sets the content that is displayed when the toggle switch is in the checked state.
public object CheckedContent { get; set; }
CheckedContentTemplate
DataTemplate
Gets or sets the template that defines the appearance of the control's checked state content.
public DataTemplate CheckedContentTemplate { get; set; }
Gets or sets the corner radius of the checked switch button track.
public double CheckedTrackRadius { get; set; }
Gets or sets the position of the content area of the toggle switch button.
public SwitchButtonContentPosition ContentPosition { get; set; }
Gets or sets the height of the switch button thumb.
public double ThumbHeight { get; set; }
Gets or sets the width of the switch button thumb.
public double ThumbWidth { get; set; }
Gets or sets the height of the switch button track.
public double TrackHeight { get; set; }
Gets or sets the width of the switch button track.
public double TrackWidth { get; set; }
Gets or sets the content that is displayed when the toggle switch is in the unchecked state.
public object UncheckedContent { get; set; }
UncheckedContentTemplate
DataTemplate
Gets or sets the template that defines the appearance of the control's unchecked state content.
public DataTemplate UncheckedContentTemplate { get; set; }
Gets or sets the corner radius of the unchecked switch button track.
public double UncheckedTrackRadius { get; set; }
Methods
Invoked whenever application code or internal processes (such as a rebuilding layout pass) call. .
public override void OnApplyTemplate()
Overrides:
OnCreateAutomationPeer()
AutomationPeer
Creates a RadToggleButtonAutomationPeer.
protected override AutomationPeer OnCreateAutomationPeer()
AutomationPeer
Overrides:
Raises the event. This method is invoked whenever is set to true internally.
protected override void OnInitialized(EventArgs e)
The RoutedEventArgs that contains the event data.
Overrides: