Edit this page

Properties, Methods and Events

Properties

Property Description Result
OnText Gets or sets the text displayed when the state is On. The default string is "ON". buttons-toggleswitch-properties-methods-events 001
OffText Gets or sets the text displayed when the state is Off. The default string is "OFF". buttons-toggleswitch-properties-methods-events 002
ThumbTickness Gets or sets width of the thumb. Its default value is 20. buttons-toggleswitch-properties-methods-events 003
SwitchElasticity Determines how far the switch needs to be dragged before it snaps to the opposite side. Its default value is 0.5
Value Gets or sets a boolean value. Its default value is true.
AllowAnimation Gets or sets a value indicating whether to use animation when changing its state. The first RadToggleSwitch is with disabled animation. buttons-toggleswitch-properties-methods-events 004
AnimationFrames Gets or sets the animation frames. Its default value is 20.
IsAnimating Gets a value indicating whether the control is currently animating.
OnElement Gets the on element of RadToggleSwitch.
OffElement Gets the off element of RadToggleSwitch.
Thumb Gets the thumb of RadToggleSwitch.
Width Gets or sets the width of RadToggleSwitch. buttons-toggleswitch-properties-methods-events 005
Height Gets or sets the height of RadToggleSwitch. buttons-toggleswitch-properties-methods-events 006
ToggleStateMode Determines how ToggleSwitch button should handle mouse click and drag.

Methods

Method Description
Toggle() Toggles the value of RadToggleSwitch.
Toggle(bool animate) Toggles the value of RadToggleSwitch indicating whether to use animation.
SetToggleState(bool newValue) Sets the value of RadToggleSwitch passing the new value as parameter.
SetToggleState(bool newValue, bool animate) Sets the value of RadToggleSwitch. The first parameter specifies the new value and the second one indicates whether to use animation.

Events

Event Description
ValueChanging It is a cancelable event which occurs when the Value is about to change.
ValueChanged Occurs when the Value has changed.
AnimationStarted Occurs when the animation starts.
AnimationFinished Occurs when the animation finishes.

See Also

Was this article helpful? Yes No
Thank you for your feedback!

Give article feedback

Tell us how we can improve this article

close
Dummy