Class ButtonSpinner
Represents a spinner control that includes two Buttons.
[TemplatePart("PART_DecreaseButton", typeof(Button))]
[TemplatePart("PART_IncreaseButton", typeof(Button))]
[PseudoClasses(new string[] { ":left", ":right" })]
public class ButtonSpinner : Spinner, INotifyPropertyChanged, IDataContextProvider, ILogical, IThemeVariantHost, IResourceHost, IResourceNode, IStyleHost, ISetLogicalParent, ISetInheritanceParent, ISupportInitialize, IStyleable, INamed, IInputElement, IDataTemplateHost, ISetterValue
- Inheritance
-
ButtonSpinner
- Implements
- Inherited Members
- Extension Methods
Constructors
ButtonSpinner()
public ButtonSpinner()
Fields
AllowSpinProperty
Defines the AllowSpin property.
public static readonly StyledProperty<bool> AllowSpinProperty
Field Value
ButtonSpinnerLocationProperty
Defines the ButtonSpinnerLocation property.
public static readonly StyledProperty<Location> ButtonSpinnerLocationProperty
Field Value
ShowButtonSpinnerProperty
Defines the ShowButtonSpinner property.
public static readonly StyledProperty<bool> ShowButtonSpinnerProperty
Field Value
Properties
AllowSpin
Gets or sets a value indicating whether the ButtonSpinner should allow to spin.
public bool AllowSpin { get; set; }
Property Value
ButtonSpinnerLocation
Gets or sets current location of the ButtonSpinner.
public Location ButtonSpinnerLocation { get; set; }
Property Value
ShowButtonSpinner
Gets or sets a value indicating whether the spin buttons should be shown.
public bool ShowButtonSpinner { get; set; }
Property Value
Methods
OnAllowSpinChanged(bool, bool)
Called when the AllowSpin property value changed.
protected virtual void OnAllowSpinChanged(bool oldValue, bool newValue)
Parameters
OnApplyTemplate(TemplateAppliedEventArgs)
Called when the control's template is applied. In simple terms, this means the method is called just before the control is displayed.
protected override void OnApplyTemplate(TemplateAppliedEventArgs e)
Parameters
e
TemplateAppliedEventArgsThe event args.
OnKeyDown(KeyEventArgs)
Called before the KeyDown event occurs.
protected override void OnKeyDown(KeyEventArgs e)
Parameters
e
KeyEventArgsThe event args.
OnPointerReleased(PointerReleasedEventArgs)
Called before the PointerReleased event occurs.
protected override void OnPointerReleased(PointerReleasedEventArgs e)
Parameters
e
PointerReleasedEventArgsThe event args.
OnPointerWheelChanged(PointerWheelEventArgs)
Called before the PointerWheelChanged event occurs.
protected override void OnPointerWheelChanged(PointerWheelEventArgs e)
Parameters
e
PointerWheelEventArgsThe event args.
OnPropertyChanged(AvaloniaPropertyChangedEventArgs)
Called when a avalonia property changes on the object.
protected override void OnPropertyChanged(AvaloniaPropertyChangedEventArgs change)
Parameters
change
AvaloniaPropertyChangedEventArgsThe property change details.
OnValidSpinDirectionChanged(ValidSpinDirections, ValidSpinDirections)
Called when valid spin direction changed.
protected override void OnValidSpinDirectionChanged(ValidSpinDirections oldValue, ValidSpinDirections newValue)
Parameters
oldValue
ValidSpinDirectionsThe old value.
newValue
ValidSpinDirectionsThe new value.