-
Notifications
You must be signed in to change notification settings - Fork 12
Vibration
Vibration.Vibrate(int duration)
Vibrates for the specified duration(in milliseconds).
The parameter duration
is not respected on iOS. Only works on Android.
Vibration.Click()
Produces a simple click feedback.
Vibration.DoubleClick()
Produces a double click feedback.
Vibration.HeavyClick()
Produces a heavier and "louder" click feedback.
Vibration.Error()
Produces 4 bursts of feedback. On iOS this uses the OS defined Error feedback pattern.
Vibration.Success()
Produces 2 bursts of feedback. On iOS this uses the OS defined Success feedback pattern.
This is used for continuous short feedback when a selection changes.
m_feedbackGenerator = new SelectionFeedbackGenerator();
m_feedbackGenerator.Prepare(); // optional, but should be done on iOS.
m_feedbackGenerator?.SelectionChanged(); // invoke to vibrate
m_feedbackGenerator?.Release();
Preferably use SelectionFeedbackGenerator.Prepare()
right before vibration should occur to give the iOS haptic feedback generator time to prepare. Not needed for Android.
- ContentControl
- DataTemplateSelectors
- Date- and TimePicker
- Modality
- Contextual Menus
- RadioButton
- TrendGraph
- Tag
- Toast