New to Telerik UI for WPF? Start a free 30-day trial

Represents a RadNumericUpDown control.

Definition

Namespace:Telerik.Windows.Controls

Assembly:Telerik.Windows.Controls.Input.dll

Syntax:

C#
[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

Initializes a new instance of the RadNumericUpDown class.

C#
public RadNumericUpDown()

Fields

AreButtonsTabStopsProperty

DependencyProperty

Identifies the AreButtonsTabStops dependency property.

C#
public static readonly DependencyProperty AreButtonsTabStopsProperty

CustomUnitProperty

DependencyProperty

Identifies the CustomUnit dependency property.

C#
public static readonly DependencyProperty CustomUnitProperty

Identifies the IncreaseButtonContentTemplate dependency property.

C#
[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

HideTrailingZerosProperty

DependencyProperty

Identifies the HideTrailingZeros dependency property.

C#
public static readonly DependencyProperty HideTrailingZerosProperty

Identifies the IncreaseButtonContentTemplate dependency property.

C#
[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

IsEditableProperty

DependencyProperty

Identifies the IsEditable dependency property.

C#
public static readonly DependencyProperty IsEditableProperty

IsHighlightedProperty

DependencyProperty

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

C#
public static readonly DependencyProperty IsHighlightedProperty

IsIntegerProperty

DependencyProperty

Identifies the IsInteger dependency property.

C#
public static readonly DependencyProperty IsIntegerProperty

IsReadOnlyProperty

DependencyProperty

Identifies the IsReadOnly dependency property.

C#
public static readonly DependencyProperty IsReadOnlyProperty

NullValueProperty

DependencyProperty

Identifies the NullValue dependency property.

C#
public static readonly DependencyProperty NullValueProperty

NumberDecimalDigitsProperty

DependencyProperty

Identifies the NumberDecimalDigits dependency property.

C#
public static readonly DependencyProperty NumberDecimalDigitsProperty

Identifies the NumberDecimalSeparator dependency property.

C#
public static readonly DependencyProperty NumberDecimalSeparatorProperty

NumberFormatInfoProperty

DependencyProperty

Identifies the NumberFormatInfo dependency property.

C#
public static readonly DependencyProperty NumberFormatInfoProperty

ShowButtonsProperty

DependencyProperty

Identifies the ShowButtons dependency property.

C#
public static readonly DependencyProperty ShowButtonsProperty

ShowTextBoxProperty

DependencyProperty

Identifies the ShowTextBox dependency property.

C#
public static readonly DependencyProperty ShowTextBoxProperty

UpdateValueEventProperty

DependencyProperty

Identifies the UpdateValueEvent dependency property.

C#
public static readonly DependencyProperty UpdateValueEventProperty

Identifies the UpdateValueToMatchTextOnLostFocusProperty dependency property.

C#
public static readonly DependencyProperty UpdateValueToMatchTextOnLostFocusProperty

ValueFormatProperty

DependencyProperty

Identifies the ValueFormat dependency property.

C#
public static readonly DependencyProperty ValueFormatProperty

Properties

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.

C#
public bool AreButtonsTabStops { get; }

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

C#
public string ContentText { get; }

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

C#
public string CustomUnit { get; set; }

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

C#
[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; }

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

C#
public bool HideTrailingZeros { get; set; }

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

C#
[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; }

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

C#
public bool IsEditable { get; set; }

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

C#
public bool IsHighlighted { get; set; }

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

C#
public bool IsInteger { get; set; }

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

C#
public bool IsReadOnly { get; set; }

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

C#
public string NullValue { get; set; }
Property Value:

The null value.

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

C#
public int NumberDecimalDigits { get; set; }

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

C#
public string NumberDecimalSeparator { get; set; }

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

C#
public NumberFormatInfo NumberFormatInfo { get; set; }

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

C#
public bool ShowButtons { get; set; }

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

C#
public bool ShowTextBox { get; set; }

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

C#
public UpdateValueEvent UpdateValueEvent { get; set; }

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

C#
public bool UpdateValueToMatchTextOnLostFocus { get; set; }

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

C#
public ValueFormat ValueFormat { get; set; }

Methods

Adds the provided delta to the current value.

C#
protected override void ChangeValue(double delta)
Parameters:deltadouble

The amount to add to Value.

Overrides: RadRangeBase.ChangeValue(double)

Formats the display value when the control is not focused.

C#
public virtual string FormatDisplay()
Returns:

string

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

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

C#
public virtual string FormatEdit()
Returns:

string

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

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

C#
public override void OnApplyTemplate()

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

C#
protected override AutomationPeer OnCreateAutomationPeer()
Returns:

AutomationPeer

Called before the event occurs.

C#
protected override void OnGotFocus(RoutedEventArgs e)
Parameters:eRoutedEventArgs

The data for the event.

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

C#
protected override void OnInitialized(EventArgs e)
Parameters:eEventArgs

The RoutedEventArgs that contains the event data.

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

C#
protected override void OnIsKeyboardFocusWithinChanged(DependencyPropertyChangedEventArgs e)
Parameters:eDependencyPropertyChangedEventArgs

A DependencyPropertyChangedEventArgs that contains the event data.

Called before the event occurs.

C#
protected void OnKeyDown(object sender, KeyEventArgs e)
Parameters:senderobject

The sender of the event.

eKeyEventArgs

The data for the event.

Called before the event occurs.

C#
protected override void OnLostFocus(RoutedEventArgs e)
Parameters:eRoutedEventArgs

The data for the event.

Called before the event occurs.

C#
protected override void OnMouseEnter(MouseEventArgs e)
Parameters:eMouseEventArgs

The data for the event.

Called before the event occurs.

C#
protected override void OnMouseLeave(MouseEventArgs e)
Parameters:eMouseEventArgs

The data for the event.

Called before the MouseLeftButtonDown event occurs.

C#
protected override void OnMouseLeftButtonDown(MouseButtonEventArgs e)
Parameters:eMouseButtonEventArgs

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.

C#
protected override void OnMouseWheel(MouseWheelEventArgs e)
Parameters:eMouseWheelEventArgs

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

Raises the event.

C#
protected override void OnValueChanged(RadRangeBaseValueChangedEventArgs e)
Parameters:eRadRangeBaseValueChangedEventArgs

The RadRangeBaseValueChangedEventArgs instance containing the event data.

Overrides: RadRangeBase.OnValueChanged(RadRangeBaseValueChangedEventArgs)

Selects a range of text in the RadNumericUpDown textbox.

C#
public void Select(int start, int length)
Parameters:startint

The zero based start.

lengthint

The length of the selection.

Selects the entire content of RadNumericUpDown textbox.

C#
public void SelectAll()