C# Class Gearset.Components.NumericSpinner

Interaction logic for the NumericSpinner control
Inheritance: System.Windows.Controls.UserControl
Show file Open project: juancampa/Gearset

Public Properties

Property Type Description
IsEditing bool
ModeProperty System.Windows.DependencyProperty
ShowNaNProperty System.Windows.DependencyProperty
ValueProperty System.Windows.DependencyProperty

Protected Properties

Property Type Description
traversalRequest System.Windows.Input.TraversalRequest

Public Methods

Method Description
Button1_MouseDownHandler ( object sender, System.Windows.Input.MouseButtonEventArgs e ) : void
Button1_MouseMoveHandler ( object sender, System.Windows.Input.MouseEventArgs e ) : void
Button1_MouseUpHandler ( object sender, System.Windows.Input.MouseButtonEventArgs e ) : void
NumericSpinner ( ) : System
TextBox1_KeyDown ( object sender, System.Windows.Input.KeyEventArgs e ) : void
TextBox1_LostFocus ( object sender, RoutedEventArgs e ) : void

Private Methods

Method Description
Clamp ( int value, int min, int max ) : int
MouseDownHandler ( object sender, System.Windows.Input.MouseButtonEventArgs e ) : void
OnModeChanged ( DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs args ) : void
ValueChangedCallback ( DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e ) : void

Method Details

Button1_MouseDownHandler() public method

public Button1_MouseDownHandler ( object sender, System.Windows.Input.MouseButtonEventArgs e ) : void
sender object
e System.Windows.Input.MouseButtonEventArgs
return void

Button1_MouseMoveHandler() public method

public Button1_MouseMoveHandler ( object sender, System.Windows.Input.MouseEventArgs e ) : void
sender object
e System.Windows.Input.MouseEventArgs
return void

Button1_MouseUpHandler() public method

public Button1_MouseUpHandler ( object sender, System.Windows.Input.MouseButtonEventArgs e ) : void
sender object
e System.Windows.Input.MouseButtonEventArgs
return void

NumericSpinner() public method

public NumericSpinner ( ) : System
return System

TextBox1_KeyDown() public method

public TextBox1_KeyDown ( object sender, System.Windows.Input.KeyEventArgs e ) : void
sender object
e System.Windows.Input.KeyEventArgs
return void

TextBox1_LostFocus() public method

public TextBox1_LostFocus ( object sender, RoutedEventArgs e ) : void
sender object
e System.Windows.RoutedEventArgs
return void

Property Details

IsEditing public property

Defines the state of the spinner, if IsEditing is because the user is currently editing the value so the Updating value of the TreeNode will be set to false until the control loses focus.
public bool IsEditing
return bool

ModeProperty public static property

What type of numeric value will this spinner handle
public static DependencyProperty,System.Windows ModeProperty
return System.Windows.DependencyProperty

ShowNaNProperty public static property

Determines whether the spinner should be blank instead of showing a "NaN" value.
public static DependencyProperty,System.Windows ShowNaNProperty
return System.Windows.DependencyProperty

ValueProperty public static property

The numeric value held by this spinner. It must be unboxed to the type defined by the spinner mode.
public static DependencyProperty,System.Windows ValueProperty
return System.Windows.DependencyProperty

traversalRequest protected static property

Defines a way to move the focus out of the textbox when enter is pressed.
protected static TraversalRequest,System.Windows.Input traversalRequest
return System.Windows.Input.TraversalRequest