@@ -46,43 +46,11 @@ The above will automatically register the required handlers by configuring lifec
4646
4747To 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"
5552xmlns : com = " http://schemas.microsoft.com/appx/manifest/com/windows10"
5653xmlns : 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
8755For 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