Edit this page

How to use the Events

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

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

  • BindingValidationError - Inherited from System.Windows.FrameworkElement

  • GotFocus - Inherited from System.Windows.UIElement

  • KeyDown - Inherited from System.Windows.UIElement

  • KeyUp - Inherited from System.Windows.UIElement

  • LayoutUpdated - Inherited from System.Windows.FrameworkElement

  • Loaded - Inherited from System.Windows.FrameworkElement

  • LostFocus - Inherited from System.Windows.UIElement)

  • MouseEnter - Inherited from System.Windows.UIElement

  • MouseLeave - Inherited from System.Windows.UIElement

  • MouseLeftButtonDown - Inherited from System.Windows.UIElement

  • MouseLeftButtonUp - Inherited from System.Windows.UIElement

  • MouseMove - Inherited from System.Windows.UIElement

  • SizeChanged - Inherited from System.Windows.FrameworkElement

  • ValueChanged - Inherited from System.Windows.Controls.Primitives.RangeBase

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

public void Events()
{
    RadNumericUpDown numeric = new RadNumericUpDown();
    numeric.ValueChanged += OnNumericValueChanged;
    numeric.Value = 10;
}

private void OnNumericValueChanged(object sender, RadRangeBaseValueChangedEventArgs e)
{
    RadWindow.Alert(String.Format("New value: {0}, Old value: {1}", e.NewValue, e.OldValue));
}
Private Sub Events()
    Dim numeric As RadNumericUpDown = New RadNumericUpDown
    AddHandler numeric.ValueChanged, AddressOf OnNumericValueChanged
    numeric.Value = 10
End Sub
Private Sub OnNumericValueChanged(sender As Object, e As RadRangeBaseValueChangedEventArgs)
    RadWindow.Alert(String.Format("New value: {0}, Old value: {1}", e.NewValue, e.OldValue))
End Sub
Was this article helpful? Yes No

Give article feedback

Tell us how we can improve this article

Dummy