Skip to content

Latest commit

 

History

History
53 lines (31 loc) · 1.9 KB

buttonbase_clickmode.md

File metadata and controls

53 lines (31 loc) · 1.9 KB
-api-id -api-type
P:Windows.UI.Xaml.Controls.Primitives.ButtonBase.ClickMode
winrt property

Windows.UI.Xaml.Controls.Primitives.ButtonBase.ClickMode

-description

Gets or sets a value that indicates when the Click event occurs, in terms of device behavior.

-xaml-syntax

<button ClickMode="clickModeMemberName"/>

-xaml-values

clickModeMemberName
clickModeMemberNameA named constant of the ClickMode enumeration, such as Hover.
## -property-value A value of the enumeration that indicates when the [Click](buttonbase_click.md) event occurs.

-remarks

-examples

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]

-see-also

Button