Overview of Microsoft.Toolkit.Uwp.Notifications
mainMicrosoft.Toolkit.Uwp.Notifications library provides an object model for generating Tile, Toast, and Badge XML notifications. It is designed to work across multiple .NET and Windows platforms.repository·main·Indexed 26 days ago
https://github.com/communitytoolkit/windowscommunitytoolkitA collection of controls and helpers for Windows development. Includes the Microsoft.Toolkit.Uwp.Notifications library for Tile, Toast, and Badge XML notifications across .NET and Windows platforms, and the MarkdownTextBlock control for efficient Markdown rendering. Documentation covers legacy 7.x NuGet packages, migration to v8+, and guidelines for contributing to the Sample Application using .bind templates and IXamlRendererListener.
Microsoft.Toolkit.Uwp.Notifications library provides an object model for generating Tile, Toast, and Badge XML notifications. It is designed to work across multiple .NET and Windows platforms.The following third-party frameworks and toolkits are recommended for UWP development:
/SamplePages/YourControl folder. This page serves as the logical navigation target. For interactive samples, you should also provide a .bind file to allow users to modify properties live via the UI.The MarkdownTextBlock control provides efficient parsing and rendering of Markdown syntax, suitable for use in virtualizing lists. Supported syntax includes:
* or _ (e.g., *italic*).** or __ (e.g., **bold**).*** or ___ (e.g., ***bold & italic***).~~ (e.g., ~~strikethrough~~).^. To include spaces in a superscript, wrap the content in parentheses: ^ (text with spaces).<sub>sub</sub>.Supports 6 levels of headers using the # prefix:
# Header 1## Header 2###### Header 6.+, -, or * followed by a space.1. Item). The control automatically handles sequential incrementing regardless of the numbers provided.`).```). You can specify a language identifier for syntax highlighting (e.g., ```csharp).[Text](URL) or [Text](URL "tooltip"). Relative links are supported but must be handled manually in the LinkClicked event.[Email](email@email.com) or direct email@email.com.. You can specify dimensions using =width, =height, or =widthxheight (e.g., ).MarkdownTextBlock control supports a subset of Markdown syntax optimized for efficient rendering in virtualizing lists. This guide covers advanced formatting options including block quotes, emojis, YAML headers, tables, and escaping characters.The .bind files use a special @[Property Name:Type:DefaultValue:Options] syntax. This allows the Sample App to generate a property UI for users. When viewing the 'Property' tab, values are bound via {Binding}; when viewing the 'XAML' tab, raw values are shown.
Supported value types:
String: @[Name:String:Default Value]Slider: @[Name:Slider:DefaultValue:Min-Max] (provides a double value)DoubleSlider: Same as Slider but with 0.01 precision.TimeSpan: @[Name:TimeSpan:DefaultValue:Min-Max] (values in milliseconds).Enum: @[Name:Enum:EnumType.DefaultValue]Brush: @[Name:Brush:Black] (color picker).Bool: @[Name:Bool:True]Thickness: @[Name:Thickness:0,20,10,0]To enable two-way binding for a property in the template, add an extra @ at the end: @[Value:Slider:0:0-180]@.
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="48" />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="1"
Foreground="Black"
Text="@[Text:String:Hey!]"
FontSize="@[FontSize:Slider:12:10-30]"
VerticalAlignment="@[Vertical Alignment:Enum:VerticalAlignment.Center]">
</TextBlock>
</Grid>For legacy 7.x projects, choose the appropriate package based on your target platform. You can install these via the Visual Studio NuGet Package Manager (Tools > NuGet Package Manager > Manage NuGet packages for solution…).
| Target | Recommended Package | Branch |
|---|---|---|
| Production (UWP) | Microsoft.Toolkit.Uwp | rel/7.1.2 |
| Production (WinAppSDK/WinUI 3) | CommunityToolkit.WinUI | rel/winui/7.1.2 |
| Previews | (Latest Pre-release) | main |
HockeySDK.UWP NuGet package.The Windows Community Toolkit — UI Controls package depends on the WinUI library. You must declare XamlControlsResources within your Application.Resources in App.xaml to ensure the controls function correctly.
If you have existing application resources, it is recommended to add them to the XamlControlsResources.MergedDictionaries collection. This allows you to use the platform's resource system to override XamlControlsResources while maintaining compatibility.
<Application
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="using:Microsoft.UI.Xaml.Controls">
<Application.Resources>
<controls:XamlControlsResources>
<controls:XamlControlsResources.MergedDictionaries>
<!-- Other app resources here -->
</controls:XamlControlsResources.MergedDictionaries>
</controls:XamlControlsResources>
</Application.Resources>
</Application>