Skip to content

microsoft/WindowsAppSDK-Samples

Repository files navigation

Windows App SDK Samples

This repository hosts samples for the Windows App SDK. Samples for various features shipping in the Windows App SDK will be added to this repository. For more information about the Windows App SDK, visit the Windows App SDK Documentation. To learn more about the Windows App SDK design or to contribute to the project, make feature proposals, or start discussions, visit the Windows App SDK GitHub page.

List of samples

  • App Lifecycle: These samples demonstrate app instancing using the AppLifecycle APIs. They include the following features:
    • Activation: These samples demonstrate support for rich activation kinds.
    • Instancing: These samples demonstrate support for single and selective multi-instancing.
    • Power Notifications: These samples demonstrate the power/system state notifications for managing app workload.
  • Resource Management: These samples demonstrates app resource management using the MRT Core APIs.
  • Text Rendering: This sample is a gallery of the DWriteCore APIs demonstrating text rendering.
  • Windowing: This sample demonstrates how to manage app windows using the Windowing APIs.
  • XAML Controls Gallery: This is a sample app that showcases all of the WinUI 3 controls in action.

Requirements

Thes Windows App SDK samples have the following system requirements:

  • Windows 10, version 1809 (build 17763) or later.

  • Visual Studio 2019 Version 16.9 or later with the following workloads and components:

    • Universal Windows Platform development
    • .NET Desktop Development (needed even if you're only building C++ Win32 apps)
    • Desktop development with C++ (needed even if you're only building .NET apps)
    • Windows SDK version 2004 (build 19041) or later. This is installed with Visual Studio 2019 by default.
  • Building .NET apps also requires:

    • .NET 5 SDK version 5.0.300 or later if you're using Visual Studio 2019 version 16.10
    • .NET 5 SDK version 5.0.204 if you're using Visual Studio 2019 version 16.9

Refer to the docs on system requirements and tools for Windows app development for a detalied list of requirements for developing apps with the Windows App SDK.

Using the samples

To use the samples with Git, clone the WindowsAppSDK-Samples repository by running git clone https://github.com/microsoft/WindowsAppSDK-Samples.git from a command prompt. You can then navigate to the directory of a sample and open the solution file in Visual Studio 2019.

The easiest way to use these samples without Git is to download the ZIP file. Select Download ZIP from the download dropdown, unzip the entire archive and open the samples in Visual Studio 2019.

Samples versioning

The samples will be updated with GA releases of the Windows App SDK. The main branch includes the latest samples, which may also include experimental or preview features. Specific release branches are named release/x.y and contain samples that reference the corresponding GA version of the Windows App SDK. This repository currently includes the following release branches:

Contributing

These samples are provided by feature teams and we welcome your input on issues and suggestions for new samples. We encourage you to file a new issue for any feedback or questions!

This project has adopted the Microsoft Open Source Code of Conduct. For more information, see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.