Class
RadNumericUpDown

Represents a RadNumericUpDown control.

Definition

Namespace:Telerik.Windows.Controls

Assembly:Telerik.Windows.Controls.Input.dll

Syntax:

cs-api-definition
[TelerikToolboxCategory("Input")]
[Themable]
public class RadNumericUpDown : RadRangeBase

Inheritance: objectRadRangeBaseRadNumericUpDown

Derived Classes: RadUpDownLineNumberingDistanceNumericUpDown

Inherited Members RadRangeBase.LargeChangePropertyRadRangeBase.MaximumPropertyRadRangeBase.MinimumPropertyRadRangeBase.SmallChangePropertyRadRangeBase.ValuePropertyRadRangeBase.AutoReversePropertyRadRangeBase.ToString()RadRangeBase.OnMaximumChanged(double, double)RadRangeBase.OnMinimumChanged(double, double)RadRangeBase.LargeChangeRadRangeBase.MaximumRadRangeBase.MinimumRadRangeBase.SmallChangeRadRangeBase.ValueRadRangeBase.AutoReverseRadRangeBase.ValueChanged

Constructors

RadNumericUpDown()

Initializes a new instance of the RadNumericUpDown class.

Declaration

cs-api-definition
public RadNumericUpDown()

Fields

AreButtonsTabStopsProperty

Identifies the AreButtonsTabStops dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty AreButtonsTabStopsProperty

Field Value

DependencyProperty

CustomUnitProperty

Identifies the CustomUnit dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty CustomUnitProperty

Field Value

DependencyProperty

DecreaseButtonContentTemplateProperty

Identifies the IncreaseButtonContentTemplate dependency property.

Declaration

cs-api-definition
[Obsolete("This is property is not used with the current implementation of RadNumericUpDown and will be deleted in the next official release.")]
public static readonly DependencyProperty DecreaseButtonContentTemplateProperty

Field Value

DependencyProperty

HideTrailingZerosProperty

Identifies the HideTrailingZeros dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty HideTrailingZerosProperty

Field Value

DependencyProperty

IncreaseButtonContentTemplateProperty

Identifies the IncreaseButtonContentTemplate dependency property.

Declaration

cs-api-definition
[Obsolete("This is property is not used with the current implementation of RadNumericUpDown and will be deleted in the next official release.")]
public static readonly DependencyProperty IncreaseButtonContentTemplateProperty

Field Value

DependencyProperty

IsEditableProperty

Identifies the IsEditable dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty IsEditableProperty

Field Value

DependencyProperty

IsHighlightedProperty

Gets or sets a value indicating whether this instance is highlighted.

Declaration

cs-api-definition
public static readonly DependencyProperty IsHighlightedProperty

Field Value

DependencyProperty

IsIntegerProperty

Identifies the IsInteger dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty IsIntegerProperty

Field Value

DependencyProperty

IsReadOnlyProperty

Identifies the IsReadOnly dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty IsReadOnlyProperty

Field Value

DependencyProperty

NullValueProperty

Identifies the NullValue dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty NullValueProperty

Field Value

DependencyProperty

NumberDecimalDigitsProperty

Identifies the NumberDecimalDigits dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty NumberDecimalDigitsProperty

Field Value

DependencyProperty

NumberDecimalSeparatorProperty

Identifies the NumberDecimalSeparator dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty NumberDecimalSeparatorProperty

Field Value

DependencyProperty

NumberFormatInfoProperty

Identifies the NumberFormatInfo dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty NumberFormatInfoProperty

Field Value

DependencyProperty

ShowButtonsProperty

Identifies the ShowButtons dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty ShowButtonsProperty

Field Value

DependencyProperty

ShowTextBoxProperty

Identifies the ShowTextBox dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty ShowTextBoxProperty

Field Value

DependencyProperty

UpdateValueEventProperty

Identifies the UpdateValueEvent dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty UpdateValueEventProperty

Field Value

DependencyProperty

UpdateValueToMatchTextOnLostFocusProperty

Identifies the UpdateValueToMatchTextOnLostFocusProperty dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty UpdateValueToMatchTextOnLostFocusProperty

Field Value

DependencyProperty

ValueFormatProperty

Identifies the ValueFormat dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty ValueFormatProperty

Field Value

DependencyProperty

Properties

AreButtonsTabStops

Read only property identifies if the increase / decrease buttons should be tab stops. Set to true when the ShowTextBox is set to false. This is a dependency property.

Declaration

cs-api-definition
public bool AreButtonsTabStops { get; }

Property Value

bool

ContentText

Gets the current text content held by the textbox. This is a dependency property.

Declaration

cs-api-definition
public string ContentText { get; }

Property Value

string

CustomUnit

Gets or sets additional string to appear in the end of numeric values. This is a dependency property.

Declaration

cs-api-definition
public string CustomUnit { get; set; }

Property Value

string

DecreaseButtonContentTemplate

Gets or sets the data template of the DecreaseButton. This is a dependency property.

Declaration

cs-api-definition
[Obsolete("This is property is not used with the current implementation of RadNumericUpDown and will be deleted in the next official release.")]
public DataTemplate DecreaseButtonContentTemplate { get; set; }

Property Value

DataTemplate

HideTrailingZeros

Gets or sets whether the trailing zeros should be displayed or not. This is a dependency property.

Declaration

cs-api-definition
public bool HideTrailingZeros { get; set; }

Property Value

bool

IncreaseButtonContentTemplate

Gets or sets the data template of the IncreaseButton. This is a dependency property.

Declaration

cs-api-definition
[Obsolete("This is property is not used with the current implementation of RadNumericUpDown and will be deleted in the next official release.")]
public DataTemplate IncreaseButtonContentTemplate { get; set; }

Property Value

DataTemplate

IsEditable

Gets or sets the value indicating whether the control is editable or not. This is a dependency property.

Declaration

cs-api-definition
public bool IsEditable { get; set; }

Property Value

bool

IsHighlighted

Gets or sets a value indicating whether this control is highlighted.

Declaration

cs-api-definition
public bool IsHighlighted { get; set; }

Property Value

bool

IsInteger

Gets or sets a value indicating whether the format is integer.

Declaration

cs-api-definition
public bool IsInteger { get; set; }

Property Value

bool

IsReadOnly

Gets or sets the value indicating whether the control is readonly or not. This is a dependency property.

Declaration

cs-api-definition
public bool IsReadOnly { get; set; }

Property Value

bool

NullValue

Gets or sets string that is displayed when the Value is null.

Declaration

cs-api-definition
public string NullValue { get; set; }

Property Value

string

The null value.

NumberDecimalDigits

Gets or sets the number of decimal digits that will be displayed in the control.

Declaration

cs-api-definition
public int NumberDecimalDigits { get; set; }

Property Value

int

NumberDecimalSeparator

Gets or sets NumberDecimalSeparator string to be used. This is a dependency property.

Declaration

cs-api-definition
public string NumberDecimalSeparator { get; set; }

Property Value

string

NumberFormatInfo

Gets or sets the NumberFormatInfo value, for more info see ValueFormat. This is a dependency property.

Declaration

cs-api-definition
public NumberFormatInfo NumberFormatInfo { get; set; }

Property Value

NumberFormatInfo

ShowButtons

Gets or sets the ShowButtons property that indicates whether the up and down buttons are visible.

Declaration

cs-api-definition
public bool ShowButtons { get; set; }

Property Value

bool

ShowTextBox

Gets or sets a value indicating whether the textbox of RadNumericUpDown is visible.

Declaration

cs-api-definition
public bool ShowTextBox { get; set; }

Property Value

bool

UpdateValueEvent

Gets or sets the way the Value property is updated. This is a dependency property.

Declaration

cs-api-definition
public UpdateValueEvent UpdateValueEvent { get; set; }

Property Value

UpdateValueEvent

UpdateValueToMatchTextOnLostFocus

Gets or sets whether to update the Value property to match the current formatted text on LostFocus. This is a dependency property.

Declaration

cs-api-definition
public bool UpdateValueToMatchTextOnLostFocus { get; set; }

Property Value

bool

ValueFormat

Gets or sets the current value format. This is a dependency property.

Declaration

cs-api-definition
public ValueFormat ValueFormat { get; set; }

Property Value

ValueFormat

Methods

ChangeValue(double)

Adds the provided delta to the current value.

Declaration

cs-api-definition
protected override void ChangeValue(double delta)

Parameters

delta

double

The amount to add to Value.

Overrides RadRangeBase.ChangeValue(double)

FormatDisplay()

Formats the display value when the control is not focused.

Declaration

cs-api-definition
public virtual string FormatDisplay()

Returns

string

Returns value that is displayed when the control doesn't have focus.

FormatEdit()

Formats the value when the control is in focus and the user is editing the content.

Declaration

cs-api-definition
public virtual string FormatEdit()

Returns

string

Return the value when the control is in focus and the user is editing the content.

OnApplyTemplate()

Overrides OnApplyTemplate and attach all necessary events to the controls. TODO: change the binding to TemplateBinding.

Declaration

cs-api-definition
public override void OnApplyTemplate()

OnCreateAutomationPeer()

Returns class-specific AutomationPeer implementations for the Windows Presentation Foundation (WPF) infrastructure.

Declaration

cs-api-definition
protected override AutomationPeer OnCreateAutomationPeer()

Returns

AutomationPeer

OnGotFocus(RoutedEventArgs)

Called before the event occurs.

Declaration

cs-api-definition
protected override void OnGotFocus(RoutedEventArgs e)

Parameters

e

RoutedEventArgs

The data for the event.

OnInitialized(EventArgs)

Raises the event. This method is invoked whenever is set to true internally.

Declaration

cs-api-definition
protected override void OnInitialized(EventArgs e)

Parameters

e

EventArgs

The RoutedEventArgs that contains the event data.

OnIsKeyboardFocusWithinChanged(DependencyPropertyChangedEventArgs)

Invoked just before the event is raised by this element. Implement this method to add class handling for this event.

Declaration

cs-api-definition
protected override void OnIsKeyboardFocusWithinChanged(DependencyPropertyChangedEventArgs e)

Parameters

e

DependencyPropertyChangedEventArgs

A DependencyPropertyChangedEventArgs that contains the event data.

OnKeyDown(object, KeyEventArgs)

Called before the event occurs.

Declaration

cs-api-definition
protected void OnKeyDown(object sender, KeyEventArgs e)

Parameters

sender

object

The sender of the event.

e

KeyEventArgs

The data for the event.

OnLostFocus(RoutedEventArgs)

Called before the event occurs.

Declaration

cs-api-definition
protected override void OnLostFocus(RoutedEventArgs e)

Parameters

e

RoutedEventArgs

The data for the event.

OnMouseEnter(MouseEventArgs)

Called before the event occurs.

Declaration

cs-api-definition
protected override void OnMouseEnter(MouseEventArgs e)

Parameters

e

MouseEventArgs

The data for the event.

OnMouseLeave(MouseEventArgs)

Called before the event occurs.

Declaration

cs-api-definition
protected override void OnMouseLeave(MouseEventArgs e)

Parameters

e

MouseEventArgs

The data for the event.

OnMouseLeftButtonDown(MouseButtonEventArgs)

Called before the MouseLeftButtonDown event occurs.

Declaration

cs-api-definition
protected override void OnMouseLeftButtonDown(MouseButtonEventArgs e)

Parameters

e

MouseButtonEventArgs

OnMouseWheel(MouseWheelEventArgs)

Invoked when an unhandled System.Windows.Input.Mouse.MouseWheel attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.

Declaration

cs-api-definition
protected override void OnMouseWheel(MouseWheelEventArgs e)

Parameters

e

MouseWheelEventArgs

The System.Windows.Input.MouseWheelEventArgs that contains the event data.

OnValueChanged(RadRangeBaseValueChangedEventArgs)

Raises the event.

Declaration

cs-api-definition
protected override void OnValueChanged(RadRangeBaseValueChangedEventArgs e)

Parameters

e

RadRangeBaseValueChangedEventArgs

The RadRangeBaseValueChangedEventArgs instance containing the event data.

Overrides RadRangeBase.OnValueChanged(RadRangeBaseValueChangedEventArgs)

Select(int, int)

Selects a range of text in the RadNumericUpDown textbox.

Declaration

cs-api-definition
public void Select(int start, int length)

Parameters

start

int

The zero based start.

length

int

The length of the selection.

SelectAll()

Selects the entire content of RadNumericUpDown textbox.

Declaration

cs-api-definition
public void SelectAll()