Skip to content

Commit 5ab92d5

Browse files
Apply suggestions from code review
Co-authored-by: Brandon Minnick <[email protected]>
1 parent 0e2d10f commit 5ab92d5

1 file changed

Lines changed: 2 additions & 34 deletions

File tree

docs/maui/alerts/snackbar.md

Lines changed: 2 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -46,43 +46,11 @@ The above will automatically register the required handlers by configuring lifec
4646

4747
To handle the snackbar actions you will need to modify the `Platform\Windows\Package.appxmanifest` file as follows:
4848

49+
1. In **Package.appxmanifest**, in the opening `<Package>` tag, add the following XML Namespaces:
50+
4951
```xml
50-
<?xml version="1.0" encoding="utf-8"?>
51-
<Package
52-
xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10"
53-
xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10"
54-
xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities"
5552
xmlns:com="http://schemas.microsoft.com/appx/manifest/com/windows10"
5653
xmlns:desktop="http://schemas.microsoft.com/appx/manifest/desktop/windows10"
57-
IgnorableNamespaces="uap rescap com desktop">
58-
59-
...
60-
61-
<Applications>
62-
<Application Id="App" Executable="$targetnametoken$.exe" EntryPoint="$targetentrypoint$">
63-
<uap:VisualElements />
64-
<Extensions>
65-
66-
<!--Specify which CLSID to activate when notification is clicked-->
67-
<desktop:Extension Category="windows.toastNotificationActivation">
68-
<desktop:ToastNotificationActivation ToastActivatorCLSID="YOUR-UNIQUE-GUID" />
69-
</desktop:Extension>
70-
71-
<!--Register COM CLSID-->
72-
<com:Extension Category="windows.comServer">
73-
<com:ComServer>
74-
<com:ExeServer Executable="YOUR-PATH-TO-EXECUTABLE" DisplayName="$targetnametoken$" Arguments="----AppNotificationActivated:"> <!--Example path: CommunityToolkit.Maui.Sample\CommunityToolkit.Maui.Sample.exe-->
75-
<com:Class Id="YOUR-UNIQUE-GUID" />
76-
</com:ExeServer>
77-
</com:ComServer>
78-
</com:Extension>
79-
80-
</Extensions>
81-
</Application>
82-
</Applications>
83-
84-
</Package>
85-
```
8654

8755
For more information on handling activation: [Send a local toast notification from C# apps](/windows/apps/design/shell/tiles-and-notifications/send-local-toast?tabs=uwp#step-3-handling-activation)
8856

0 commit comments

Comments
 (0)