Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specify UI thread use for Apple platforms #2714

Merged
merged 2 commits into from
Jan 7, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion docs/platform-integration/device/haptic-feedback.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "Haptic Feedback"
description: "Learn how to use the .NET MAUI IHapticFeedback class in the Microsoft.Maui.Devices namespace. This interface lets you control haptic feedback on a device."
ms.date: 02/02/2023
ms.date: 01/07/2025
no-loc: ["Microsoft.Maui", "Microsoft.Maui.Devices"]
---

Expand Down Expand Up @@ -62,3 +62,6 @@ No setup is required.
The haptic feedback functionality is performed in two modes: a short <xref:Microsoft.Maui.Devices.HapticFeedbackType.Click> or a <xref:Microsoft.Maui.Devices.HapticFeedbackType.LongPress>. The following code example initiates a `Click` or `LongPress` haptic feedback response to the user based on which <xref:Microsoft.Maui.Controls.Button> they click:

:::code language="csharp" source="../snippets/shared_1/DeviceDetailsPage.xaml.cs" id="hapticfeedback":::

> [!IMPORTANT]
> On Apple platforms, haptic feedback functionality must be executed on the UI thread.
Loading