-api-id | -api-type |
---|---|
P:Windows.UI.Xaml.Controls.Primitives.ButtonBase.ClickMode |
winrt property |
Gets or sets a value that indicates when the Click event occurs, in terms of device behavior.
<button ClickMode="clickModeMemberName"/>
- clickModeMemberName
- clickModeMemberNameA named constant of the ClickMode enumeration, such as Hover.
The following example shows three buttons that respond to clicks in three different ways based on their ClickMode property value.
- Hover - When the mouse pointer hovers over the first button, the foreground color of the button changes.
- Press - When the left mouse button is pressed while over the second button, the foreground color of the button changes.
- Release - When the mouse button is pressed and released while over the third button, the button resets the foreground color of the other two buttons to their original color.
[!code-xaml1]
[!code-csharp11]
[!code-vb11]