Property | Type | Description | |
---|---|---|---|
ButtonBackgroundProperty | |||
ButtonBorderBrushProperty | |||
ButtonBorderThicknessProperty | |||
ButtonCornerRadiusProperty | |||
ButtonForegroundProperty | |||
ButtonMouseOverBackgroundProperty | |||
ButtonPressedBackgroundProperty | |||
DelayProperty | |||
IntervalProperty | |||
MaxValueProperty | |||
MinValueProperty | |||
ValueProperty |
Method | Description | |
---|---|---|
NumericUpDownTextBox ( ) : System |
Constructor: initializes the TextBox, creates the buttons, and attaches event handlers for the buttons and TextBox
|
Method | Description | |
---|---|---|
ArrangeOverride ( |
Called to arrange and size the content of a System.Windows.Controls.Control object.
|
|
GetVisualChild ( int index ) : Visual |
Overrides System.Windows.Media.Visual.GetVisualChild(System.Int32), and returns a child at the specified index from a collection of child elements.
|
Method | Description | |
---|---|---|
Add ( int value ) : void |
Works directly with the Value property to increment or decrement the integer value in the textbox
|
|
ButtonPropertyChangedCallback ( |
||
ButtonTimerCallback ( Object sender ) : void | ||
Button_Click ( object sender, |
Handles up button click (ie increment TextBox value)
|
|
Button_PreviewMouseDown ( object sender, System.Windows.Input.MouseButtonEventArgs e ) : void |
When mouse button is depressed over the up or down button, initiates the RepeatButton behaviour by setting up a timer
|
|
Button_PreviewMouseUp ( object sender, System.Windows.Input.MouseButtonEventArgs e ) : void |
Resets the repeat button so no longer active when Mouse button released Does not matter if mouse is on button or not
|
|
FixValue ( ) : int |
Only does something if the Textbox contains an out of range number
|
|
FixValueKeyPress ( int value ) : bool |
Will fix value only if the value is beyond what could be a valid entry given more characters could be added to TextBox
|
|
HandleModifiers ( int value ) : void |
Checks if any of the Keyboard modifier keys are pressed that might affect the change in the value of the TextBox. In this case only the shift key affects the value
|
|
MinMaxValueChangedCallback ( |
||
OnValueChanged ( ) : void | ||
RepeatButtonCallback ( object o ) : void |
Observes the button timer event for the repeat button functionality, and then starts the 'Value' dependency property change process Note: Cannot interact directly with UI from this event
|
|
RepeatButtonDispatched ( int value ) : void |
Checks that mouse cursor is in the button, and if so updates the 'Value' dependency property
|
|
UpdateText ( int value ) : void | ||
ValueChangedCallback ( |
||
control_LostFocus ( object sender, |
||
control_PreviewKeyDown ( object sender, System.Windows.Input.KeyEventArgs e ) : void |
Checks if the keypress is the up or down key, and then handles keyboard input
|
|
control_PreviewTextInput ( object sender, System.Windows.Input.TextCompositionEventArgs e ) : void |
Ensures that keypress is a valid character (numeric or negative sign) - negative sign ('-') only allowed if Minimum value less than 0, the entry is at the beginning of the text and there is not already a negative sign - number only allowed if not beginning of text and there is a negative sign
|
protected ArrangeOverride ( |
||
arrangeSize | The computed size that is used to /// arrange the content | |
return |
protected GetVisualChild ( int index ) : Visual | ||
index | int | The zero-based index of the requested child element in the collection. |
return | Visual |
public static DependencyProperty,System.Windows ButtonBackgroundProperty | ||
return |
public static DependencyProperty,System.Windows ButtonBorderBrushProperty | ||
return |
public static DependencyProperty,System.Windows ButtonBorderThicknessProperty | ||
return |
public static DependencyProperty,System.Windows ButtonCornerRadiusProperty | ||
return |
public static DependencyProperty,System.Windows ButtonForegroundProperty | ||
return |
public static DependencyProperty,System.Windows ButtonMouseOverBackgroundProperty | ||
return |
public static DependencyProperty,System.Windows ButtonPressedBackgroundProperty | ||
return |
public static DependencyProperty,System.Windows DelayProperty | ||
return |
public static DependencyProperty,System.Windows IntervalProperty | ||
return |
public static DependencyProperty,System.Windows MaxValueProperty | ||
return |
public static DependencyProperty,System.Windows MinValueProperty | ||
return |