Class RadToggleSwitchElement
Inheritance
Inherited Members
Namespace: Telerik.WinControls.UI
Assembly: Telerik.WinControls.UI.dll
Syntax
public class RadToggleSwitchElement : LightVisualElement, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IComponent, IDisposable, IBindableComponent, ISupportDrag, ISupportDrop, IShortcutProvider, IStylableElement, IStylableNode, IPrimitiveElement, IShapedElement, IFillElement, IBorderElement, IBoxStyle, IBoxElement, IImageElement, ITextPrimitive, ITextProvider
Constructors
RadToggleSwitchElement()
Declaration
public RadToggleSwitchElement()
Fields
IsOnProperty
ThumbOffsetProperty
ThumbTicknessProperty
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
|
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
|
IsAnimating
Gets a value indicating whether the control is currently animating.
Declaration
public bool IsAnimating { get; set; }
Property Value
System.Boolean
|
IsOn
Declaration
public bool IsOn { get; }
Property Value
System.Boolean
|
OffElement
Gets the off element.
Declaration
public ToggleSwitchPartElement OffElement { get; protected set; }
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
Declaration
public ToggleSwitchPartElement OnElement { get; protected set; }
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
|
Thumb
Gets the thumb element.
Declaration
public ToggleSwitchThumbElement Thumb { get; protected set; }
Property Value
ToggleSwitchThumbElement
|
ThumbOffset
Declaration
public int ThumbOffset { get; set; }
Property Value
System.Int32
|
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
|
Value
Gets or sets the value.
Declaration
public bool Value { get; set; }
Property Value
System.Boolean
|
Methods
ArrangeOverride(SizeF)
Declaration
protected override SizeF ArrangeOverride(SizeF finalSize)
Parameters
System.Drawing.SizeF
finalSize
|
Returns
System.Drawing.SizeF
|
Overrides
CancelAnimation()
Cancels the currently running animation.
Declaration
public void CancelAnimation()
CreateChildElements()
Declaration
protected override void CreateChildElements()
Overrides
CreatePartElement()
Declaration
protected virtual ToggleSwitchPartElement CreatePartElement()
Returns
ToggleSwitchPartElement
|
CreateThumbElement()
Declaration
protected virtual ToggleSwitchThumbElement CreateThumbElement()
Returns
ToggleSwitchThumbElement
|
DisposeManagedResources()
Declaration
protected override void DisposeManagedResources()
Overrides
GetClientRectangle(SizeF)
Declaration
protected override RectangleF GetClientRectangle(SizeF finalSize)
Parameters
System.Drawing.SizeF
finalSize
|
Returns
System.Drawing.RectangleF
|
Overrides
GetClipRect()
Declaration
protected override RectangleF GetClipRect()
Returns
System.Drawing.RectangleF
|
Overrides
InitializeFields()
Declaration
protected override void InitializeFields()
Overrides
OnAnimationFinished(AnimationStatusEventArgs)
Declaration
protected virtual void OnAnimationFinished(AnimationStatusEventArgs e)
Parameters
AnimationStatusEventArgs
e
|
OnAnimationStarted(AnimationStatusEventArgs)
Declaration
protected virtual void OnAnimationStarted(AnimationStatusEventArgs e)
Parameters
AnimationStatusEventArgs
e
|
OnKeyDown(KeyEventArgs)
Declaration
protected override void OnKeyDown(KeyEventArgs e)
Parameters
System.Windows.Forms.KeyEventArgs
e
|
Overrides
OnMouseDown(MouseEventArgs)
Declaration
protected override void OnMouseDown(MouseEventArgs e)
Parameters
System.Windows.Forms.MouseEventArgs
e
|
Overrides
OnMouseMove(MouseEventArgs)
Declaration
protected override void OnMouseMove(MouseEventArgs e)
Parameters
System.Windows.Forms.MouseEventArgs
e
|
Overrides
OnMouseUp(MouseEventArgs)
Declaration
protected override void OnMouseUp(MouseEventArgs e)
Parameters
System.Windows.Forms.MouseEventArgs
e
|
Overrides
OnValueChanged()
Declaration
protected virtual void OnValueChanged()
OnValueChanging(ValueChangingEventArgs)
Declaration
protected virtual void OnValueChanging(ValueChangingEventArgs e)
Parameters
ValueChangingEventArgs
e
|
PaintBorder(IGraphics, Single, SizeF)
Declaration
protected override void PaintBorder(IGraphics graphics, float angle, SizeF scale)
Parameters
IGraphics
graphics
|
System.Single
angle
|
System.Drawing.SizeF
scale
|
Overrides
ProcessAnimation()
Declaration
protected virtual void ProcessAnimation()
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
Declaration
public event AnimationFinishedEventHandler AnimationFinished
Event Type
AnimationFinishedEventHandler
|
AnimationStarted
Declaration
public event AnimationStartedEventHandler AnimationStarted
Event Type
AnimationStartedEventHandler
|
ValueChanged
Declaration
public event EventHandler ValueChanged
Event Type
System.EventHandler
|
ValueChanging
Declaration
public event ValueChangingEventHandler ValueChanging
Event Type
ValueChangingEventHandler
|