C# 클래스 DynamicVizSegmenter.CustomControls.NumericUpDownTextBox

Interaction logic for NumericUpDownTextBox.xaml
상속: System.Windows.Controls.TextBox
파일 보기 프로젝트 열기: nickun/OCRonet 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
ButtonBackgroundProperty System.Windows.DependencyProperty
ButtonBorderBrushProperty System.Windows.DependencyProperty
ButtonBorderThicknessProperty System.Windows.DependencyProperty
ButtonCornerRadiusProperty System.Windows.DependencyProperty
ButtonForegroundProperty System.Windows.DependencyProperty
ButtonMouseOverBackgroundProperty System.Windows.DependencyProperty
ButtonPressedBackgroundProperty System.Windows.DependencyProperty
DelayProperty System.Windows.DependencyProperty
IntervalProperty System.Windows.DependencyProperty
MaxValueProperty System.Windows.DependencyProperty
MinValueProperty System.Windows.DependencyProperty
ValueProperty System.Windows.DependencyProperty

공개 메소드들

메소드 설명
NumericUpDownTextBox ( ) : System

Constructor: initializes the TextBox, creates the buttons, and attaches event handlers for the buttons and TextBox

보호된 메소드들

메소드 설명
ArrangeOverride ( Size arrangeSize ) : Size

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.

비공개 메소드들

메소드 설명
Add ( int value ) : void

Works directly with the Value property to increment or decrement the integer value in the textbox

ButtonPropertyChangedCallback ( DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e ) : void
ButtonTimerCallback ( Object sender ) : void
Button_Click ( object sender, RoutedEventArgs e ) : void

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 ( DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e ) : void
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 ( DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e ) : void
control_LostFocus ( object sender, RoutedEventArgs e ) : void
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

메소드 상세

ArrangeOverride() 보호된 메소드

Called to arrange and size the content of a System.Windows.Controls.Control object.
protected ArrangeOverride ( Size arrangeSize ) : Size
arrangeSize System.Windows.Size The computed size that is used to /// arrange the content
리턴 System.Windows.Size

GetVisualChild() 보호된 메소드

Overrides System.Windows.Media.Visual.GetVisualChild(System.Int32), and returns a child at the specified index from a collection of child elements.
protected GetVisualChild ( int index ) : Visual
index int The zero-based index of the requested child element in the collection.
리턴 Visual

NumericUpDownTextBox() 공개 메소드

Constructor: initializes the TextBox, creates the buttons, and attaches event handlers for the buttons and TextBox
public NumericUpDownTextBox ( ) : System
리턴 System

프로퍼티 상세

ButtonBackgroundProperty 공개적으로 정적으로 프로퍼티

public static DependencyProperty,System.Windows ButtonBackgroundProperty
리턴 System.Windows.DependencyProperty

ButtonBorderBrushProperty 공개적으로 정적으로 프로퍼티

public static DependencyProperty,System.Windows ButtonBorderBrushProperty
리턴 System.Windows.DependencyProperty

ButtonBorderThicknessProperty 공개적으로 정적으로 프로퍼티

public static DependencyProperty,System.Windows ButtonBorderThicknessProperty
리턴 System.Windows.DependencyProperty

ButtonCornerRadiusProperty 공개적으로 정적으로 프로퍼티

public static DependencyProperty,System.Windows ButtonCornerRadiusProperty
리턴 System.Windows.DependencyProperty

ButtonForegroundProperty 공개적으로 정적으로 프로퍼티

public static DependencyProperty,System.Windows ButtonForegroundProperty
리턴 System.Windows.DependencyProperty

ButtonMouseOverBackgroundProperty 공개적으로 정적으로 프로퍼티

public static DependencyProperty,System.Windows ButtonMouseOverBackgroundProperty
리턴 System.Windows.DependencyProperty

ButtonPressedBackgroundProperty 공개적으로 정적으로 프로퍼티

public static DependencyProperty,System.Windows ButtonPressedBackgroundProperty
리턴 System.Windows.DependencyProperty

DelayProperty 공개적으로 정적으로 프로퍼티

public static DependencyProperty,System.Windows DelayProperty
리턴 System.Windows.DependencyProperty

IntervalProperty 공개적으로 정적으로 프로퍼티

public static DependencyProperty,System.Windows IntervalProperty
리턴 System.Windows.DependencyProperty

MaxValueProperty 공개적으로 정적으로 프로퍼티

public static DependencyProperty,System.Windows MaxValueProperty
리턴 System.Windows.DependencyProperty

MinValueProperty 공개적으로 정적으로 프로퍼티

public static DependencyProperty,System.Windows MinValueProperty
리턴 System.Windows.DependencyProperty

ValueProperty 공개적으로 정적으로 프로퍼티

public static DependencyProperty,System.Windows ValueProperty
리턴 System.Windows.DependencyProperty