ClassRadSpinEditor
Represents a numeric up/down control box. The RadSpinEditor class is a simple wrapper for the RadSpinElement class. The RadSpinEditor acts to transfer events to and from its corresponding RadSpinElement. The RadSpinElement which is essentially the RadSpinEditor control may be nested in other telerik controls.
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.UI.dll
Syntax:
[TelerikToolboxCategory("Editors")]
[DefaultBindingProperty("Value")]
public class RadSpinEditor : RadEditorControl, IDropTarget, ISynchronizeInvoke, IWin32Window, IBindableComponent, IComponent, IDisposable, INotifyPropertyChanged, ISupportInitializeNotification, IComponentTreeHandler, ILayoutHandler, IAnalyticsProvider, ISupportInitialize, ISupportRootUIAutomation
Inheritance: objectMarshalByRefObjectComponentControlScrollableControlRadControlRadEditorControlRadSpinEditor
Implements:
Inherited Members
Constructors
RadSpinEditor()
Initializes a new instance of the RadSpinEditor class.
Declaration
public RadSpinEditor()
Properties
AutoSize
Gets or sets whether the edit control is auto-sized.
Declaration
[Browsable(true)]
public override bool AutoSize { get; set; }
Property Value
Overrides
CausesValidation
Gets or sets a value indicating whether the control causes validation to be performed on any controls that require validation when it receives focus.
Declaration
public bool CausesValidation { get; set; }
Property Value
true if the control causes validation to be performed on any controls requiring validation when it receives focus; otherwise, false.
DecimalPlaces
Gets or sets the number of decimal places to display in the RadSpinEditor.
DefaultSize
Gets the default control size.
Declaration
protected override Size DefaultSize { get; }
Property Value
Overrides
EnableNullValueInput
Gets or sets how to interpret the empty text in the editor portion of the control. If true the empty value will set NULL in NullableValue property.
Declaration
public virtual bool EnableNullValueInput { get; set; }
Property Value
EnableUIAutomation
Gets or sets a value indicating whether the UI Automation functionality is enabled or disabled for this control.
Declaration
public override bool EnableUIAutomation { get; set; }
Property Value
Overrides
Implements
Hexadecimal
Gets or sets a value indicating whether the RadSpinEditor should display the value it contains in hexadecimal format.
Increment
Gets or sets the increment value for step.
InterceptArrowKeys
Gets or sets a value indicating whether the user can use the UP ARROW and DOWN ARROW keys to select values.
Maximum
Gets or sets the maximum value for the spin editor.
Minimum
Gets or sets the minimum value for the spin editor.
Name
Gets or sets the name of the control.
NullableValue
Gets or sets the decimal value in the numeric up/down control. The Value can be null.
Declaration
[Bindable(true)]
public decimal? NullableValue { get; set; }
Property Value
ReadOnly
Gets or sets a value indicating whether the text can be changed by the use of the up or down buttons only.
RightMouseButtonReset
Gets or sets whether by right-mouse clicking the up/down button you reset the value to the Maximum/Minimum value respectively.
ShowBorder
Gets or sets a value indicating whether the border is shown.
ShowUpDownButtons
Gets or sets whether RadSpinEditor will be used as a numeric textbox.
SpinElement
Gets the instance of RadSpinElement wrapped by this control. RadSpinElement is the main element in the hierarchy tree and encapsulates the actual functionality of RadSpinEditor.
Declaration
[Browsable(false)]
public RadSpinElement SpinElement { get; }
Property Value
Step
Set or get the Step value
Declaration
[Browsable(false)]
public decimal Step { get; set; }
Property Value
TabStop
Gets or sets a value indicating whether the user can give the focus to this control using the TAB key.
Declaration
public bool TabStop { get; set; }
Property Value
true if the user can give the focus to the control using the TAB key, otherwise false. The default is true.
TextAlignment
Gets or sets the text alignment of the RadSpinEditor.
Declaration
public virtual HorizontalAlignment TextAlignment { get; set; }
Property Value
ThousandsSeparator
Gets or sets a value indicating whether a thousands separator is displayed in the RadSpinEditor.
Value
Gets or sets the decimal value in the numeric up/down control.
Declaration
[Bindable(true)]
public decimal Value { get; set; }
Property Value
Methods
ControlDefinesThemeForElement(RadElement)
Determines whether the control defines the theme for the specified element.
Declaration
public override bool ControlDefinesThemeForElement(RadElement element)
Parameters
element
The element to check.
Returns
true if the control defines the theme for the element; otherwise, false.
Overrides
CreateAccessibilityInstance()
Creates the accessibility instance for this control.
Declaration
protected override AccessibleObject CreateAccessibilityInstance()
Returns
An AccessibleObject instance for accessibility support.
Overrides
CreateChildItems(RadElement)
Creates child items in the RadSpinEditor control element hierarchy.
Declaration
protected override void CreateChildItems(RadElement parent)
Parameters
parent
The parent element to which child items are added.
Overrides
CreateSpinElement()
Creates the spin element for this control.
Declaration
protected virtual RadSpinElement CreateSpinElement()
Returns
A RadSpinElement instance.
OnEnter(EventArgs)
Raises the Enter event.
OnLeave(EventArgs)
Raises the Leave event.
OnLostFocus(EventArgs)
Raises the LostFocus event.
OnRightToLeftChanged(EventArgs)
Raises the RightToLeftChanged event.
OnValidated(EventArgs)
Raises the Validated event.
Declaration
protected override void OnValidated(EventArgs e)
Parameters
e
An EventArgs containing the event data.
Overrides
OnValueChanged(EventArgs)
Raises the ValueChanged event.
OnValueChanging(ValueChangingEventArgs)
Raises the ValueChanging event.
Declaration
protected virtual void OnValueChanging(ValueChangingEventArgs args)
Parameters
args
A ValueChangingEventArgs containing the event data.
PerformStep(decimal)
Increases or decreases the value in the numeric up/down control by the specified step value.
Declaration
public void PerformStep(decimal step)
Parameters
step
The value to add to or subtract from the current value.
ProcessAutoSizeChanged(bool)
Processes the AutoSize property when it changes.
Declaration
protected override void ProcessAutoSizeChanged(bool value)
Parameters
value
The new value of the AutoSize property.
Overrides
ResetBackColorThemeOverrides()
Resets the BackColor theme overrides.
Declaration
protected override void ResetBackColorThemeOverrides()
Overrides
ResetForeColorThemeOverrides()
Resets the ForeColor theme overrides.
Declaration
protected override void ResetForeColorThemeOverrides()
Overrides
Select(bool, bool)
Activates a child control.
SetBackColorThemeOverrides()
Sets the BackColor theme overrides.
Declaration
protected override void SetBackColorThemeOverrides()
Overrides
SetForeColorThemeOverrides()
Sets the ForeColor theme overrides.
Declaration
protected override void SetForeColorThemeOverrides()
Overrides
WndProc(ref Message)
Processes Windows messages.
Declaration
protected override void WndProc(ref Message m)
Parameters
m
The Windows Message to process.
Overrides
Events
NullableValueChanged
Occurs when the NullableValue of the RadSpinEditor is changed.
Declaration
public event EventHandler NullableValueChanged
Event Value
ValueChanged
Occurs before the value of the RadSpinEditor is changed.
ValueChanging
Occurs before the value of the RadSpinEditor is changing.
Declaration
public event ValueChangingEventHandler ValueChanging
Event Value