Skip to end of metadata
Go to start of metadata

UXButtonSpinner is a content control that represents a spin box (also known as an up-down control). 

On this page:

Content Control

UXButtonSpinner is inherited from ISContentControl, which means that it can contain a single object of any type (such as a string, an image, or a panel). For more information about this content model, see Content Model Overview.

The following code shows you how to create a simple UXButtonSpinner control. 

XAML

Using UXButtonSpinner

UXButtonSpinner is a content control which has two repeat button that are used to increase or decrease. You can used spin event to perform a logic for increase or decrease when the spin button is click. 

Customizing UXButtonSpinner Appearance

The default spin button alignment is always set to the right. To change the alignment of the spinner button, you set the SpinnerAlignment property to the Left. In case the spinner button is not desired, you set the SpinnerVisibility property to Collapsed. Although the spinner button are not shown, you can still perform the increment and decrement operation by pressing key up and key down.

The following code shows how to change the spinner alignment in UXButtonSpinner

XAML

The following code shows how to change the spinner visibility in UXButtonSpinner

XAML

If you would like to completely customize the control appearance or if you want to change the styles of each visual state, you can edit the template of the control and do the modification accordingly. To learn how to customize the template and visual states, see Styles and Template Overview