Edit

Share via


RepeatButton

The RepeatButton is similar to a Button. However, RepeatButton elements give you control over when and how the Click event occurs.

The following graphic shows an example of the three states of a repeat button control, Default, PointerFocused, and Pressed. The first button shows the default state of the RepeatButton. The second shows how the appearance of the button changes when the mouse pointer hovers over the button, giving it focus. The last button shows the appearance of the RepeatButton when the user presses the mouse button over the control.

Two RepeatButton controls demonstrating the typical placement at the end of a counter textbox.

Styles and templates

You can modify the default ControlTemplate to give the RepeatButton control a unique appearance. For more information, see What are styles and templates? and How to create a template for a control.

Content property

The RepeatButton control uses the Content property to define the content displayed within the button.

Parts

This control doesn't define any template parts.

Visual states

The following table lists the visual states for the RepeatButton control.

VisualState Name VisualStateGroup Name Description
Normal CommonStates The control is in its normal state.
MouseOver CommonStates The mouse is over the control.
Pressed CommonStates The control is pressed.
Disabled CommonStates The control is disabled.
Focused FocusStates The control has keyboard focus.
Unfocused FocusStates The control doesn't have keyboard focus.
Valid ValidationStates The control is valid and has no validation errors.
InvalidFocused ValidationStates The control has a validation error and has keyboard focus.
InvalidUnfocused ValidationStates The control has a validation error but doesn't have keyboard focus.

See also