New to Telerik UI for WPFStart a free 30-day trial

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

Constructors

Initializes a new instance of the RadToggleSwitchButton class.

C#
public RadToggleSwitchButton()

Fields

CheckedContentProperty

DependencyProperty

Identifies the CheckedContent property.

C#
public static readonly DependencyProperty CheckedContentProperty

Identifies the CheckedContentTemplate property.

C#
public static readonly DependencyProperty CheckedContentTemplateProperty

CheckedTrackRadiusProperty

DependencyProperty

Identifies the CheckedTrackRadius property.

C#
public static readonly DependencyProperty CheckedTrackRadiusProperty

ContentPositionProperty

DependencyProperty

Identifies the ContentPosition property.

C#
public static readonly DependencyProperty ContentPositionProperty

ThumbHeightProperty

DependencyProperty

Identifies the ThumbHeight property.

C#
public static readonly DependencyProperty ThumbHeightProperty

ThumbWidthProperty

DependencyProperty

Identifies the ThumbWidth property.

C#
public static readonly DependencyProperty ThumbWidthProperty

TrackHeightProperty

DependencyProperty

Identifies the TrackHeight property.

C#
public static readonly DependencyProperty TrackHeightProperty

TrackWidthProperty

DependencyProperty

Identifies the TrackWidth property.

C#
public static readonly DependencyProperty TrackWidthProperty

UncheckedContentProperty

DependencyProperty

Identifies the UncheckedContent property.

C#
public static readonly DependencyProperty UncheckedContentProperty

Identifies the UncheckedContentTemplate property.

C#
public static readonly DependencyProperty UncheckedContentTemplateProperty

Identifies the UncheckedTrackRadius property.

C#
public static readonly DependencyProperty UncheckedTrackRadiusProperty

Properties

Gets or sets the content that is displayed when the toggle switch is in the checked state.

C#
public object CheckedContent { get; set; }

Gets or sets the template that defines the appearance of the control's checked state content.

C#
public DataTemplate CheckedContentTemplate { get; set; }

Gets or sets the corner radius of the checked switch button track.

C#
public double CheckedTrackRadius { get; set; }

Gets or sets the position of the content area of the toggle switch button.

C#
public SwitchButtonContentPosition ContentPosition { get; set; }

Gets or sets the height of the switch button thumb.

C#
public double ThumbHeight { get; set; }

Gets or sets the width of the switch button thumb.

C#
public double ThumbWidth { get; set; }

Gets or sets the height of the switch button track.

C#
public double TrackHeight { get; set; }

Gets or sets the width of the switch button track.

C#
public double TrackWidth { get; set; }

Gets or sets the content that is displayed when the toggle switch is in the unchecked state.

C#
public object UncheckedContent { get; set; }

Gets or sets the template that defines the appearance of the control's unchecked state content.

C#
public DataTemplate UncheckedContentTemplate { get; set; }

Gets or sets the corner radius of the unchecked switch button track.

C#
public double UncheckedTrackRadius { get; set; }

Methods

Invoked whenever application code or internal processes (such as a rebuilding layout pass) call. .

C#
public override void OnApplyTemplate()

Overrides: RadToggleButton.OnApplyTemplate()

Creates a RadToggleButtonAutomationPeer.

C#
protected override AutomationPeer OnCreateAutomationPeer()
Returns:

AutomationPeer

Overrides: RadToggleButton.OnCreateAutomationPeer()

Raises the event. This method is invoked whenever is set to true internally.

C#
protected override void OnInitialized(EventArgs e)
Parameters:eEventArgs

The RoutedEventArgs that contains the event data.

Overrides: RadToggleButton.OnInitialized(EventArgs)