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, ISupportRootUIAutomation
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.
|
AnimationFrames
Gets or sets the animation frames.
Declaration
public int AnimationFrames { get; set; }
Property Value
System.
|
AnimationInterval
Gets or sets the animation interval.
Declaration
public int AnimationInterval { get; set; }
Property Value
System.
|
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.
|
Overrides
DefaultSize
Declaration
protected override Size DefaultSize { get; }
Property Value
System.
|
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.
|
EnableUIAutomation
Gets or sets a value indicating whether the UI Automation functionality is enabled or disabled for this control.
Declaration
public virtual bool EnableUIAutomation { get; set; }
Property Value
System.
|
Implements
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.
|
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.
|
Overrides
IsAnimating
Gets a value indicating whether the control is currently animating.
Declaration
public bool IsAnimating { get; }
Property Value
System.
|
OffElement
Gets the off element of Rad
Declaration
public ToggleSwitchPartElement OffElement { get; }
Property Value
OffText
Gets or sets the text displayed when the state is Off.
Declaration
public string OffText { get; set; }
Property Value
System.
|
OnElement
Gets the on element of Rad
Declaration
public ToggleSwitchPartElement OnElement { get; }
Property Value
OnText
Gets or sets the text displayed when the state is On.
Declaration
public string OnText { get; set; }
Property Value
System.
|
ReadOnly
Gets or sets a value indicating whether the value could be changed.
Declaration
public bool ReadOnly { get; set; }
Property Value
System.
|
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.
|
Text
This property is not relevant for this class.
Declaration
public override string Text { get; set; }
Property Value
System.
|
Overrides
Thumb
Gets the thumb of Rad
Declaration
public ToggleSwitchThumbElement Thumb { get; }
Property Value
ThumbTickness
Gets or sets width of the thumb.
Declaration
[VsbBrowsable(true)]
public int ThumbTickness { get; set; }
Property Value
System.
|
ToggleStateMode
Determines how ToggleSwitch button should handle mouse click and drag.
Declaration
public ToggleStateMode ToggleStateMode { get; set; }
Property Value
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
Value
Gets or sets the value.
Declaration
public bool Value { get; set; }
Property Value
System.
|
Methods
CreateChildItems(RadElement)
Declaration
protected override void CreateChildItems(RadElement parent)
Parameters
Rad
|
Overrides
IsInputKey(Keys)
Declaration
protected override bool IsInputKey(Keys keyData)
Parameters
System.
|
Returns
System.
|
Overrides
OnEnabledChanged(EventArgs)
Declaration
protected override void OnEnabledChanged(EventArgs e)
Parameters
System.
|
Overrides
OnGotFocus(EventArgs)
Declaration
protected override void OnGotFocus(EventArgs e)
Parameters
System.
|
Overrides
OnLoad(Size)
Declaration
protected override void OnLoad(Size desiredSize)
Parameters
System.
|
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. The new value. |
SetToggleState(Boolean, Boolean)
Sets the value of RadToggleSwitch.
Declaration
public void SetToggleState(bool newValue, bool animate)
Parameters
System. The new value. |
System. 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. Indicates whether to use animation. |
WndProc(ref Message)
Declaration
protected override void WndProc(ref Message m)
Parameters
System.
|
Overrides
Events
AnimationFinished
Occurs when the animation finishes.
Declaration
public event AnimationFinishedEventHandler AnimationFinished
Event Type
AnimationStarted
Occurs when the animation starts.
Declaration
public event AnimationStartedEventHandler AnimationStarted
Event Type
ValueChanged
Occurs when the Value has changed.
Declaration
public event EventHandler ValueChanged
Event Type
System.
|
ValueChanging
Occurs when the Value is about to change. Cancelable.
Declaration
public event ValueChangingEventHandler ValueChanging
Event Type
Explicit Interface Implementations
ISupportRootUIAutomation.InitializeUIAutomationProvider()
Creates the UI Automation provider for this control.
Declaration
void ISupportRootUIAutomation.InitializeUIAutomationProvider()
Implements
ISupportRootUIAutomation.RootUIAutomationManager
Declaration
IRootUIAutomationManager ISupportRootUIAutomation.RootUIAutomationManager { get; }
Returns
Implements
ISupportRootUIAutomation.UIAutomationProvider
Gets the UI Automation Provider.
Declaration
IRadRawElementProviderFragmentRoot ISupportRootUIAutomation.UIAutomationProvider { get; }