Events

RadNumericUpDown inherits several common events that can be used to customize the functionality of the control.

Here is a brief list of all events exposed by RadNumericUpDown.

  • BindingValidationError: Occurs when a data validation error is reported by a binding source. Inherited from FrameworkElement.

  • GotFocus: Occurs when the control receives focus. Inherited from UIElement.

  • KeyDown: Occurs when a key is pressed while the focus is on this element. Inherited from UIElement.

  • KeyUp: Occurs when a key is released while the focus is on this element. Inherited from UIElement.

  • LayoutUpdated: Occurs when the layout of the various visual elements associated with the current Dispatcher changes. Inherited from FrameworkElement.

  • Loaded: Occurs when the element is laid out, rendered, and ready for interaction. Inherited from FrameworkElement.

  • LostFocus: Occurs when this element loses logical focus. Inherited from UIElement.

  • MouseEnter: Occurs when the mouse pointer enters the bounds of this element. Inherited from UIElement.

  • MouseLeave: Occurs when the mouse pointer leaves the bounds of this element. Inherited from UIElement.

  • MouseLeftButtonDown: Occurs when the left mouse button is pressed while the mouse pointer is over this element. Inherited from UIElement.

  • MouseLeftButtonUp: Occurs when the left mouse button is released while the mouse pointer is over this element. Inherited from UIElement.

  • MouseMove: Occurs when the mouse pointer moves while over this element. Inherited from UIElement.

  • SizeChanged: Occurs when either the ActualHeight or the ActualWidth properties change value on this element. Inherited from FrameworkElement.

  • ValueChanged: Occurs when the range value changes. Inherited from RangeBase.

Here is an example of how to use the ValueChanged event that is raised whenever the value of RadNumericUpDown is changed:

Example 1: Handling the ValueChanged event

private void NumericUpDown_ValueChanged(object sender, RadRangeBaseValueChangedEventArgs e) 
{ 
    MessageBox.Show("New value is: " + e.NewValue + "\nOld value was: " + e.OldValue); 
} 
Private Sub NumericUpDown_ValueChanged(ByVal sender As Object, ByVal e As RadRangeBaseValueChangedEventArgs) 
    MessageBox.Show("New value is: " & e.NewValue & ControlChars.Lf & "Old value was: " & e.OldValue) 
End Sub 
In this article
Not finding the help you need? Improve this article