Class
RadToggleSwitchButton

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

RadToggleSwitchButton()

Initializes a new instance of the RadToggleSwitchButton class.

Declaration

cs-api-definition
public RadToggleSwitchButton()

Fields

CheckedContentProperty

Identifies the CheckedContent property.

Declaration

cs-api-definition
public static readonly DependencyProperty CheckedContentProperty

Field Value

DependencyProperty

CheckedContentTemplateProperty

Identifies the CheckedContentTemplate property.

Declaration

cs-api-definition
public static readonly DependencyProperty CheckedContentTemplateProperty

Field Value

DependencyProperty

CheckedTrackRadiusProperty

Identifies the CheckedTrackRadius property.

Declaration

cs-api-definition
public static readonly DependencyProperty CheckedTrackRadiusProperty

Field Value

DependencyProperty

ContentPositionProperty

Identifies the ContentPosition property.

Declaration

cs-api-definition
public static readonly DependencyProperty ContentPositionProperty

Field Value

DependencyProperty

ThumbHeightProperty

Identifies the ThumbHeight property.

Declaration

cs-api-definition
public static readonly DependencyProperty ThumbHeightProperty

Field Value

DependencyProperty

ThumbWidthProperty

Identifies the ThumbWidth property.

Declaration

cs-api-definition
public static readonly DependencyProperty ThumbWidthProperty

Field Value

DependencyProperty

TrackHeightProperty

Identifies the TrackHeight property.

Declaration

cs-api-definition
public static readonly DependencyProperty TrackHeightProperty

Field Value

DependencyProperty

TrackWidthProperty

Identifies the TrackWidth property.

Declaration

cs-api-definition
public static readonly DependencyProperty TrackWidthProperty

Field Value

DependencyProperty

UncheckedContentProperty

Identifies the UncheckedContent property.

Declaration

cs-api-definition
public static readonly DependencyProperty UncheckedContentProperty

Field Value

DependencyProperty

UncheckedContentTemplateProperty

Identifies the UncheckedContentTemplate property.

Declaration

cs-api-definition
public static readonly DependencyProperty UncheckedContentTemplateProperty

Field Value

DependencyProperty

UncheckedTrackRadiusProperty

Identifies the UncheckedTrackRadius property.

Declaration

cs-api-definition
public static readonly DependencyProperty UncheckedTrackRadiusProperty

Field Value

DependencyProperty

Properties

CheckedContent

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

Declaration

cs-api-definition
public object CheckedContent { get; set; }

Property Value

object

CheckedContentTemplate

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

Declaration

cs-api-definition
public DataTemplate CheckedContentTemplate { get; set; }

Property Value

DataTemplate

CheckedTrackRadius

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

Declaration

cs-api-definition
public double CheckedTrackRadius { get; set; }

Property Value

double

ContentPosition

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

Declaration

cs-api-definition
public SwitchButtonContentPosition ContentPosition { get; set; }

Property Value

SwitchButtonContentPosition

ThumbHeight

Gets or sets the height of the switch button thumb.

Declaration

cs-api-definition
public double ThumbHeight { get; set; }

Property Value

double

ThumbWidth

Gets or sets the width of the switch button thumb.

Declaration

cs-api-definition
public double ThumbWidth { get; set; }

Property Value

double

TrackHeight

Gets or sets the height of the switch button track.

Declaration

cs-api-definition
public double TrackHeight { get; set; }

Property Value

double

TrackWidth

Gets or sets the width of the switch button track.

Declaration

cs-api-definition
public double TrackWidth { get; set; }

Property Value

double

UncheckedContent

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

Declaration

cs-api-definition
public object UncheckedContent { get; set; }

Property Value

object

UncheckedContentTemplate

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

Declaration

cs-api-definition
public DataTemplate UncheckedContentTemplate { get; set; }

Property Value

DataTemplate

UncheckedTrackRadius

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

Declaration

cs-api-definition
public double UncheckedTrackRadius { get; set; }

Property Value

double

Methods

OnApplyTemplate()

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

Declaration

cs-api-definition
public override void OnApplyTemplate()

Overrides RadToggleButton.OnApplyTemplate()

OnCreateAutomationPeer()

Creates a RadToggleButtonAutomationPeer.

Declaration

cs-api-definition
protected override AutomationPeer OnCreateAutomationPeer()

Returns

AutomationPeer

Overrides RadToggleButton.OnCreateAutomationPeer()

OnInitialized(EventArgs)

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

Declaration

cs-api-definition
protected override void OnInitialized(EventArgs e)

Parameters

e

EventArgs

The RoutedEventArgs that contains the event data.

Overrides RadToggleButton.OnInitialized(EventArgs)