Please login to access all of the features of the Community Site.

PerformHapticFeedback

M v3.0

This is to perform Haptic Feedback on a user's device. If you are unfamiliar with what haptic feedback is, here is a good reference.

The CommandParameter is a string, but can be left out unless you specifically want to implement the "LongPress" type. Everything else will default to the "Click" type.

Properties

PropertyTypeDescription
HapticFeedbackTypestringThe type of haptic feedback you want to implement. Only two accepted values are "Click" or "LongPress".

Examples

<!-- Example with no command parameter. Defaults to "Click". -->
<Button Text="Haptic"
    Command="{Binding PerformHapticFeedback}" />
<!-- Example with the "LongPress" command parameter. -->
<Button Text="Haptic LongPress"
    Command="{Binding PerformHapticFeedback}"
    CommandParameter="LongPress" />