Class RadToggleSwitch
Inherited Members
Namespace: Telerik.WinControls.UI
Assembly: Telerik.WinControls.UI.dll
Syntax
public class RadToggleSwitch : RadControl, INotifyPropertyChanged, ISupportInitializeNotification, ISupportInitialize, IComponentTreeHandler, ILayoutHandler, IPCHost, IAnalyticsProvider
Constructors
RadToggleSwitch()
Declaration
public RadToggleSwitch()
Properties
AllowAnimation
Gets or sets a value indicating whether to use animation when changing its state.
Declaration
public bool AllowAnimation { get; set; }
Property Value
System.Boolean
|
AnimationFrames
Gets or sets the animation frames.
Declaration
public int AnimationFrames { get; set; }
Property Value
System.Int32
|
AnimationInterval
Gets or sets the animation interval.
Declaration
public int AnimationInterval { get; set; }
Property Value
System.Int32
|
BackColor
RadToggleSwitch consists of multiple visual elements and separate settings are provided to customize their appearance. Current BackColor property might be ignored.
Declaration
public override Color BackColor { get; set; }
Property Value
System.Drawing.Color
|
Overrides
DefaultSize
Declaration
protected override Size DefaultSize { get; }
Property Value
System.Drawing.Size
|
DragSize
Gets or sets the width and height of a rectangle centered on the point the mouse button was pressed, within which a drag operation will not begin. This property is used to differentiate the Drag and Click mouse operations. If the end user drags the mouse less pixels than the value of this property and releases the mouse button, the operation will be considered as a mouse click.
Declaration
public int DragSize { get; set; }
Property Value
System.Int32
|
Font
Gets or sets the Font of the control. This actually the Font property of the root element.
Declaration
public override Font Font { get; set; }
Property Value
System.Drawing.Font
|
Overrides
ForeColor
RadToggleSwitch consists of multiple visual elements and separate settings are provided to customize their appearance. Current ForeColor property might be ignored.
Declaration
public override Color ForeColor { get; set; }
Property Value
System.Drawing.Color
|
Overrides
IsAnimating
Gets a value indicating whether the control is currently animating.
Declaration
public bool IsAnimating { get; }
Property Value
System.Boolean
|
OffElement
Gets the off element of RadToggleSwitch.
Declaration
public ToggleSwitchPartElement OffElement { get; }
Property Value
ToggleSwitchPartElement
|
OffText
Gets or sets the text displayed when the state is Off.
Declaration
public string OffText { get; set; }
Property Value
System.String
|
OnElement
Gets the on element of RadToggleSwitch.
Declaration
public ToggleSwitchPartElement OnElement { get; }
Property Value
ToggleSwitchPartElement
|
OnText
Gets or sets the text displayed when the state is On.
Declaration
public string OnText { get; set; }
Property Value
System.String
|
ReadOnly
Gets or sets a value indicating whether the value could be changed.
Declaration
public bool ReadOnly { get; set; }
Property Value
System.Boolean
|
SwitchElasticity
Determines how far the switch needs to be dragged before it snaps to the opposite side.
Declaration
public double SwitchElasticity { get; set; }
Property Value
System.Double
|
Text
This property is not relevant for this class.
Declaration
public override string Text { get; set; }
Property Value
System.String
|
Overrides
Thumb
Gets the thumb of RadToggleSwitch.
Declaration
public ToggleSwitchThumbElement Thumb { get; }
Property Value
ToggleSwitchThumbElement
|
ThumbTickness
Gets or sets width of the thumb.
Declaration
[VsbBrowsable(true)]
public int ThumbTickness { get; set; }
Property Value
System.Int32
|
ToggleStateMode
Determines how ToggleSwitch button should handle mouse click and drag.
Declaration
public ToggleStateMode ToggleStateMode { get; set; }
Property Value
ToggleStateMode
|
ToggleSwitchElement
Gets the instance of RadToggleSwitchElement wrapped by this control. RadToggleSwitchElement is the main element in the hierarchy tree and encapsulates the actual functionality of RadToggleSwitch.
Declaration
public RadToggleSwitchElement ToggleSwitchElement { get; }
Property Value
RadToggleSwitchElement
|
Value
Gets or sets the value.
Declaration
public bool Value { get; set; }
Property Value
System.Boolean
|
Methods
CreateChildItems(RadElement)
Declaration
protected override void CreateChildItems(RadElement parent)
Parameters
RadElement
parent
|
Overrides
IsInputKey(Keys)
Declaration
protected override bool IsInputKey(Keys keyData)
Parameters
System.Windows.Forms.Keys
keyData
|
Returns
System.Boolean
|
Overrides
OnGotFocus(EventArgs)
Declaration
protected override void OnGotFocus(EventArgs e)
Parameters
System.EventArgs
e
|
Overrides
OnLoad(Size)
Declaration
protected override void OnLoad(Size desiredSize)
Parameters
System.Drawing.Size
desiredSize
|
Overrides
ResetBackColorThemeOverrides()
Declaration
protected override void ResetBackColorThemeOverrides()
Overrides
ResetForeColorThemeOverrides()
Declaration
protected override void ResetForeColorThemeOverrides()
Overrides
SetBackColorThemeOverrides()
Declaration
protected override void SetBackColorThemeOverrides()
Overrides
SetForeColorThemeOverrides()
Declaration
protected override void SetForeColorThemeOverrides()
Overrides
SetToggleState(Boolean)
Sets the value of RadToggleSwitch.
Declaration
public void SetToggleState(bool newValue)
Parameters
System.Boolean
newValue
The new value. |
SetToggleState(Boolean, Boolean)
Sets the value of RadToggleSwitch.
Declaration
public void SetToggleState(bool newValue, bool animate)
Parameters
System.Boolean
newValue
The new value. |
System.Boolean
animate
Indicates whether to use animation. |
Toggle()
Toggles the value of RadToggleSwitch
Declaration
public void Toggle()
Toggle(Boolean)
Toggles the value of RadToggleSwitch
Declaration
public void Toggle(bool animate)
Parameters
System.Boolean
animate
Indicates whether to use animation. |
Events
AnimationFinished
Occurs when the animation finishes.
Declaration
public event AnimationFinishedEventHandler AnimationFinished
Event Type
AnimationFinishedEventHandler
|
AnimationStarted
Occurs when the animation starts.
Declaration
public event AnimationStartedEventHandler AnimationStarted
Event Type
AnimationStartedEventHandler
|
ValueChanged
Occurs when the Value has changed.
Declaration
public event EventHandler ValueChanged
Event Type
System.EventHandler
|
ValueChanging
Occurs when the Value is about to change. Cancelable.
Declaration
public event ValueChangingEventHandler ValueChanging
Event Type
ValueChangingEventHandler
|