C# Class Btl.Controls.SpinnerControl

Interaction logic for SpinnerControl.xaml
Inheritance: System.Windows.Controls.UserControl
Afficher le fichier Open project: barrylapthorn/countdown_timer Class Usage Examples

Private Properties

Свойство Type Description
CoerceValue object
InitializeCommands void
LimitValueByBounds decimal
OnValueChanged void
SpinnerControl System

Méthodes protégées

Méthode Description
OnDecrease ( ) : void
OnDecreaseCommand ( Object sender, System.Windows.Input.ExecutedRoutedEventArgs e ) : void
OnIncrease ( ) : void
OnIncreaseCommand ( Object sender, System.Windows.Input.ExecutedRoutedEventArgs e ) : void
OnValueChanged ( RoutedPropertyChangedEventArgs e ) : void

Raise the ValueChanged event. Derived classes can use this.

UpdateFormattedValue ( decimal newValue ) : void

Update the formatted value.

Private Methods

Méthode Description
CoerceValue ( DependencyObject obj, object value ) : object
InitializeCommands ( ) : void

Since we're using RoutedCommands for the up/down buttons, we need to register them with the command manager so we can tie the events to callbacks in the control.

LimitValueByBounds ( decimal newValue, SpinnerControl control ) : decimal
OnValueChanged ( DependencyObject obj, System.Windows.DependencyPropertyChangedEventArgs args ) : void

If the value changes, update the text box that displays the Value property to the consumer.

SpinnerControl ( ) : System

Method Details

OnDecrease() protected méthode

protected OnDecrease ( ) : void
Résultat void

OnDecreaseCommand() protected static méthode

protected static OnDecreaseCommand ( Object sender, System.Windows.Input.ExecutedRoutedEventArgs e ) : void
sender Object
e System.Windows.Input.ExecutedRoutedEventArgs
Résultat void

OnIncrease() protected méthode

protected OnIncrease ( ) : void
Résultat void

OnIncreaseCommand() protected static méthode

protected static OnIncreaseCommand ( Object sender, System.Windows.Input.ExecutedRoutedEventArgs e ) : void
sender Object
e System.Windows.Input.ExecutedRoutedEventArgs
Résultat void

OnValueChanged() protected méthode

Raise the ValueChanged event. Derived classes can use this.
protected OnValueChanged ( RoutedPropertyChangedEventArgs e ) : void
e RoutedPropertyChangedEventArgs
Résultat void

UpdateFormattedValue() protected méthode

Update the formatted value.
protected UpdateFormattedValue ( decimal newValue ) : void
newValue decimal
Résultat void