ButtonBase Behaviors
Other than the Flyout
property, the Button
class exposes no additional APIs on top of what it inherits from ButtonBase
. In addition to its Click
event, ButtonBase
exposes IsPointerOver
and IsPressed
Boolean properties. IsPressed
covers keyboard input as well as pointer input, such as holding down the spacebar.
The most interesting feature of ButtonBase
, however, is its ClickMode
property. This can be set to a value of a ClickMode
enumeration to control exactly when the Click
event gets raised. Its values are Release
(the default), Press
, and Hover
. Although changing the ClickMode
setting on standard buttons would likely confuse users, this capability can be handy for buttons that have been restyled to look like something ...
Get Universal Windows® Apps with XAML and C# Unleashed now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.