Samples and resources
This page contains links to resources that can make you more efficient as you develop your apps for Windows. It includes sample apps and toolkits; code samples that demonstrate specific tasks, features, and API usage patterns; and tools to enhance your development environment.
Sample gallery apps
The WinUI 3 Gallery app showcases all the XAML UI components in an interactive format. This app is the interactive companion to the Fluent Design Guidelines and has examples of WinUI 3 controls, features, and styles.
You can get the app from the Microsoft Store or get the source code on GitHub at microsoft/WinUI-Gallery.
Use this sample app to browse through a collection of samples showing creative ways to customize and differentiate your app, then check out the accompanying code on GitHub to see how it was made. It showcases a variety of Microsoft.UI.Composition and Microsoft.UI.Input APIs, the building blocks that make up the Fluent Design System.
You can get the app from the Microsoft Store or get the source code on GitHub at microsoft/WindowsCompositionSamples.
Toolkits and helpers
The Windows Community Toolkit is a collection of helper functions, custom controls, and app services. It simplifies and demonstrates common developer tasks when building apps for Windows. See Get started with the Windows Community Toolkit for detailed information about using the toolkit.
You can get the Windows Community Toolkit Gallery app from the Microsoft Store to see the controls in an actual app or get the source code on GitHub at CommunityToolkit/Windows.
Template Studio for WinUI accelerates the creation of new WinUI apps using a wizard-based UI. It's available to create apps using C# and the MVVM Toolkit.
You can get the extension from the Visual Studio Marketplace or get the source code on GitHub at microsoft/TemplateStudio.
Important
Template Studio for WinUI only creates apps that use the MVVM design pattern. It does not support creating apps that use the standard code-behind pattern.
Windows App SDK / WinUI 3 samples
The samples in this list demonstrate features from the Windows App SDK and WinUI 3. See our Samples Browser for a more extensive catalog of samples.
Most of the samples identified in this list contain Solution (.sln
) files that can be opened in Visual Studio. Refer to each resource's Readme
for additional instructions.
You can find these sample in the main Windows App SDK samples repository on GitHub at microsoft/WindowsAppSDK-Samples
Samples that demonstrate specific tasks
Sample | Task |
---|---|
Activation | Handle app activation kinds. App activiation APIs control the way that your app handles activation kinds like Launch , File , and Protocol . |
App Instancing | Determine application instancing behavior. App instancing APIs control whether or not users can run multiple instances of your application at the same time. |
Power Notifications | Use state notifications. State notifications allow you to detect when the user's device enters specific states, such as low power mode. |
Restart | Programatically restart your app. This sample makes use of the Windows App SDK Restart APIs. |
Resource Management | Tailor your app to the user and device settings. MRT Core resource management APIs allow you to adapt resource utilization to specific situations. |
Deployment Manager | Call the Deployment API to ensure that Windows application framework components are up to date. |
Installer | Launch the Windows App SDK installer without using a console window. |
TextRendering with DWriteCore | Render text using DWriteCore APIs. |
Unpackaged | Windows App SDK deployment guide for framework-dependent apps packaged with external location or unpackaged, an alternative to packaged app deployment architecture. |
Dynamic Dependencies | Demonstrates the techniques shown in Use the dynamic dependency API to reference MSIX packages at run time. |
Push Notifications | Add push notifications to your app. Push Notifications can be used to send device-native app notifications to users. |
App Notifications | Add toast notifications to your app. See App Notifications to learn more. |
Custom Controls | Add custom C#/WinRT controls to your app using the patterns demonstrated in Author Windows Runtime components with C#/WinRT. |
Windowing | Add windowing support to your app to create/hide new windows, customize titlebars, and more. See Manage App Windows to learn more. |
Development environment
If you've completed the steps in Get started with WinUI, then you've already installed Visual Studio and enabled Developer Mode. These links provide more information about these tools to take you beyond the basics.
Developer Mode
Windows has a special mode for developers that adjusts security settings in order let you to run the apps you're working on. For more information, see Enable your device for development and Developer Mode features and debugging.
The preferred development tool of many Windows developers, Visual Studio will let you create projects for Windows, and many other platforms. It is a powerful IDE that can help you write, debug, and deploy your apps. For more information about the many things you can do with Visual Studio, see the Visual Studio documentation.
A highly extensible editor, Visual Studio Code can be customized to support almost any kind of development you can think of. It is a great choice for writing apps for Windows, and other platforms. For more information, see the Visual Studio Code documentation.
Additional tools
These additional tools will help you set up your development environment on Windows.
Dev Home
Introduced with Windows 11, Dev Home is a dashboard that provides quick access to the tools you need to develop apps for Windows.
Dev Drive
In order to speed up common development tasks, you can create a specially formatted drive (a Dev Drive) that is used to store your projects.
Windows Terminal
Windows Terminal is a modern host application for the command-line shells you already love, like Command Prompt, PowerShell, and bash (via WSL).
Windows Subsystem for Linux (WSL)
WSL lets you run Linux distributions on Windows. This is a great way to use open source tools to develop apps for Windows.
Language documentation
Most WinUI apps are written in C# or C++. These guides contain articles, tutorials, and code samples to help you get started with these languages.
Next steps
Now is also a good time to create a developer account. Among other things, this will allow you to publish your apps to the Microsoft Store. Here is how you do that: Create a developer account
Also see:
Windows developer