This repository was archived by the owner on Feb 25, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New Win32 toast notification helpers (no more shortcut needed!) #3457
Merged
Merged
Changes from 54 commits
Commits
Show all changes
60 commits
Select commit
Hold shift + click to select a range
6fcbb11
New Notifications code
andrewleader 1518f28
Auto register!
andrewleader 236d1e3
Works for Desktop Bridge!
andrewleader 568601b
Styling fixes
andrewleader 9729eca
Icon from EXE works!
andrewleader 6b64b85
Switch to using icon
andrewleader f385bb3
Fix compile error
andrewleader d499165
Include icon in sample app
andrewleader 1f770c1
High quality images
andrewleader 3800284
Switch to ToastCompat
andrewleader 4363829
Use Compat API
andrewleader 84b9bf3
Also check EXE path
andrewleader 1f0bc00
Sample app update
andrewleader 55a4332
First use AssemblyTitle for app name
andrewleader b8917c6
Disable Win32 apps from release
andrewleader dc1587c
Add uninstall method
andrewleader aaba4e0
Disable uninstall when under MSIX
andrewleader b62c968
Enable building of WPF sample app
andrewleader d7cf313
Merge branch 'master' into aleader/notifications-registry
andrewleader efcf30e
Hide InternalNotificationActivator
andrewleader 1bfe408
Remove unnecessary usings
andrewleader a65c9cc
Build fixes and cleanup
andrewleader 252bbc0
Fix sln.
azchohfi bb5b042
Avoid double registration
andrewleader 2463bbd
Sparse signed package support
andrewleader 3c37592
Simplified Show and Schedule methods
andrewleader 9f084ff
Add tests for new builder
andrewleader 9e1f362
Merge branch 'master' into aleader/notifications-registry
andrewleader 0cc87d1
Update sample app samples
andrewleader 644f307
Merge branch 'master' into aleader/notifications-registry
azchohfi c87a371
Fix ToastCode.bind
andrewleader a57ba76
Merge branch 'aleader/notifications-registry' of https://github.com/w…
andrewleader 0b65a73
Merge branch 'master' into aleader/notifications-registry
andrewleader 28e7730
Use shortcut
andrewleader 5a8d9b3
Refactoring to Win32AppInfo
andrewleader 04a7e71
Refactor into ManifestHelper
andrewleader 389c6e1
Merge branch 'master' into aleader/notifications-registry
andrewleader e8cd6f0
ToastContentBuilder support for C++ UWP apps
andrewleader 1b0c403
Catch exception on initialization to avoid crashing entire app
andrewleader 8876688
Merge branch 'master' into aleader/notifications-registry
Rosuavio 0288c06
Merge branch 'master' into aleader/notifications-registry
michael-hawker 62bc118
Merge branch 'master' into aleader/notifications-registry
andrewleader e94afd0
Update icon
andrewleader 8b696d4
Added ToastArguments
andrewleader 1e45495
NIT fix
andrewleader bf2139d
Added enum and int helpers
andrewleader 634478d
Tests and fixes for ToastArguments
andrewleader e8f8d70
Update toast samples to use ToastArguments
andrewleader 02ff3a8
Fixed bug in TileBuilder small tile content
andrewleader 3d96ba1
Merge branch 'master' into aleader/notifications-registry
andrewleader 8956b81
Add headers
andrewleader f1a3f02
Update qmatteoq license
andrewleader f9045de
Simplified generic toast arguments
andrewleader 305dd6f
Merge branch 'master' into aleader/notifications-registry
andrewleader 89ed383
Add back top level action type in samples
andrewleader 5c8fc1b
ToastButton builders
andrewleader 8efdf17
Merge branch 'master' into aleader/notifications-registry
andrewleader 0f1bdb4
Added missing header
andrewleader 3b5dfa7
Merge branch 'master' into aleader/notifications-registry
michael-hawker aa6e892
Merge branch 'master' into aleader/notifications-registry
Kyaa-dost File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -15,21 +15,21 @@ public enum TileSize | |
| /// <summary> | ||
| /// Small Square Tile | ||
| /// </summary> | ||
| Small = 0, | ||
| Small = 1, | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Guess we'll want to document this as a breaking change too?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah true that technically could be a breaking change |
||
|
|
||
| /// <summary> | ||
| /// Medium Square Tile | ||
| /// </summary> | ||
| Medium = 1, | ||
| Medium = 2, | ||
|
|
||
| /// <summary> | ||
| /// Wide Rectangle Tile | ||
| /// </summary> | ||
| Wide = 2, | ||
| Wide = 4, | ||
|
|
||
| /// <summary> | ||
| /// Large Square Tile | ||
| /// </summary> | ||
| Large = 4 | ||
| Large = 8 | ||
| } | ||
| } | ||
39 changes: 39 additions & 0 deletions
39
Microsoft.Toolkit.Uwp.Notifications/Toasts/Builder/CustomizeToast.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| // Licensed to the .NET Foundation under one or more agreements. | ||
| // The .NET Foundation licenses this file to you under the MIT license. | ||
| // See the LICENSE file in the project root for more information. | ||
|
|
||
| #if WINDOWS_UWP | ||
|
|
||
| using Windows.Foundation; | ||
| using Windows.UI.Notifications; | ||
|
|
||
| namespace Microsoft.Toolkit.Uwp.Notifications | ||
| { | ||
| /// <summary> | ||
| /// Allows you to set additional properties on the <see cref="ToastNotification"/> object before the toast is displayed. | ||
| /// </summary> | ||
| /// <param name="toast">The toast to modify that will be displayed.</param> | ||
| public delegate void CustomizeToast(ToastNotification toast); | ||
|
|
||
| /// <summary> | ||
| /// Allows you to set additional properties on the <see cref="ToastNotification"/> object before the toast is displayed. | ||
| /// </summary> | ||
| /// <param name="toast">The toast to modify that will be displayed.</param> | ||
| /// <returns>An operation.</returns> | ||
| public delegate IAsyncAction CustomizeToastAsync(ToastNotification toast); | ||
|
|
||
| /// <summary> | ||
| /// Allows you to set additional properties on the <see cref="ScheduledToastNotification"/> object before the toast is scheduled. | ||
| /// </summary> | ||
| /// <param name="toast">The scheduled toast to modify that will be scheduled.</param> | ||
| public delegate void CustomizeScheduledToast(ScheduledToastNotification toast); | ||
|
|
||
| /// <summary> | ||
| /// Allows you to set additional properties on the <see cref="ScheduledToastNotification"/> object before the toast is scheduled. | ||
| /// </summary> | ||
| /// <param name="toast">The scheduled toast to modify that will be scheduled.</param> | ||
| /// <returns>An operation.</returns> | ||
| public delegate IAsyncAction CustomizeScheduledToastAsync(ScheduledToastNotification toast); | ||
| } | ||
|
|
||
| #endif |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Huh, didn't see .NET 5 previews coming for this reflection package??