Class ButtonSpinner
Represents a spinner control that includes two Buttons.
Inherited Members
Namespace: System.Windows.Controls
Assembly: OpenSilver.dll
Syntax
[TemplatePart(Name = "IncreaseButton", Type = typeof(ButtonBase))]
[TemplatePart(Name = "DecreaseButton", Type = typeof(ButtonBase))]
public class ButtonSpinner : Spinner
Remarks
ButtonSpinner inherits from Spinner. It adds two button template parts and a content property.
Constructors
| Improve this Doc View SourceButtonSpinner()
Initializes a new instance of the ButtonSpinner class.
Declaration
public ButtonSpinner()
Fields
| Improve this Doc View SourceContentProperty
Identifies the Content dependency property.
Declaration
public static readonly DependencyProperty ContentProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
Properties
| Improve this Doc View SourceContent
Gets or sets the content that is contained within the button spinner.
Declaration
public object Content { get; set; }
Property Value
Type | Description |
---|---|
System.Object |
Methods
| Improve this Doc View SourceOnApplyTemplate()
Builds the visual tree for the ButtonSpinner control when a new template is applied.
Declaration
public override void OnApplyTemplate()
Overrides
| Improve this Doc View SourceOnContentChanged(Object, Object)
Occurs when the Content property value changed.
Declaration
protected virtual void OnContentChanged(object oldValue, object newValue)
Parameters
Type | Name | Description |
---|---|---|
System.Object | oldValue | The old value of the Content property. |
System.Object | newValue | The new value of the Content property. |
OnGotFocus(RoutedEventArgs)
Provides handling for the GotFocus event.
Declaration
protected override void OnGotFocus(RoutedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
RoutedEventArgs | e | The data for the event. |
Overrides
| Improve this Doc View SourceOnLostFocus(RoutedEventArgs)
Provides handling for the LostFocus event.
Declaration
protected override void OnLostFocus(RoutedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
RoutedEventArgs | e | The data for the event. |
Overrides
| Improve this Doc View SourceOnMouseEnter(MouseEventArgs)
Provides handling for the MouseEnter event.
Declaration
protected override void OnMouseEnter(MouseEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
MouseEventArgs | e | Event arguments. |
Overrides
| Improve this Doc View SourceOnMouseLeave(MouseEventArgs)
Provides handling for the MouseLeave event.
Declaration
protected override void OnMouseLeave(MouseEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
MouseEventArgs | e | Event arguments. |
Overrides
| Improve this Doc View SourceOnMouseLeftButtonDown(MouseButtonEventArgs)
Provides handling for the MouseLeftButtonDown event.
Declaration
protected override void OnMouseLeftButtonDown(MouseButtonEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
MouseButtonEventArgs | e | A MouseButtonEventArgs that contains the event data. |
Overrides
| Improve this Doc View SourceOnMouseLeftButtonUp(MouseButtonEventArgs)
Cancel LeftMouseButtonUp events originating from a button that has been changed to disabled.
Declaration
protected override void OnMouseLeftButtonUp(MouseButtonEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
MouseButtonEventArgs | e | The data for the event. |
Overrides
| Improve this Doc View SourceOnValidSpinDirectionChanged(ValidSpinDirections, ValidSpinDirections)
Called when valid spin direction changed.
Declaration
protected override void OnValidSpinDirectionChanged(ValidSpinDirections oldValue, ValidSpinDirections newValue)
Parameters
Type | Name | Description |
---|---|---|
ValidSpinDirections | oldValue | The old value. |
ValidSpinDirections | newValue | The new value. |