1 Star 1 Fork 0

Gitee 极速下载 / windowsappsdk-samples

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/microsoft/WindowsAppSDK-Samples
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

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 and System Services

  • 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.
    • Restart: These samples demonstrate synchronously restarting an app with command-line restart arguments.
    • Share Target: This sample demonstrates an app that can be activated as a share target.

Data and Files

  • Resource Management: These samples demonstrates app resource management using the MRT Core APIs.

Deployment

  • Deployment Manager: This sample demonstrates how to initialize and access deployment information for the Windows App SDK runtime.
  • Installer: This sample demonstrates how to launch the Windows App SDK installer without a console window.
  • Unpackaged: These samples demonstrate auto-initialization with the Windows App SDK package from non-MSIX (unpackaged) application.

Dynamic Dependencies

  • DirectX: This sample demonstrates how to use the Dynamic Dependencies API to dynamically load the DirectX Runtime MSIX framework package.

Graphics

  • Text Rendering: This sample is a gallery of the DWriteCore APIs demonstrating text rendering.

Notifications

Runtime Components

  • Custom Controls: This sample shows how to author a Windows Runtime Component in C# with custom WinUI controls.

User Interface and Input

  • Windowing: This sample demonstrates how to manage app windows using the Windowing APIs.
  • Windows Input and Composition Gallery: This collection of samples showcases Microsoft.UI.Composition and Microsoft.UI.Input APIs.
  • WinUI 3 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 2022 or 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 by default.
  • Building .NET C# samples with Windows App SDK 1.1 also requires one of the following .NET SDK versions or later:

    • 6.0.202
    • 6.0.104
    • 5.0.407
    • 5.0.213

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.

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.

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!

Sample authors should follow the samples guidelines to begin developing their samples. For WinUI-based Windows App SDK samples, use the sample templates. The VSIX file is available for download in the Github releases page here.

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.

Once a new sample app has been added, Microsoft developers shall consider updating the internal Aggregator pipeline to:

  • Enable building of the new sample app regularly.
  • Add a new test case to the existing SampleTests TAEF test driver to regularly verify successful launchng of the sample app against the latest Windows App SDK version.

Refer to the documentation on the internal Aggregator repository for instructions, in the BuildSampleApps and TestSampleApps Stages.

MIT License Copyright (c) Microsoft Corporation. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE

简介

此仓库包含 Windows App SDK 的使用样例,方便软件开发者利用 Windows App SDK 编写程序 展开 收起
C/C++ 等 5 种语言
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
C/C++
1
https://gitee.com/mirrors/windowsappsdk-samples.git
git@gitee.com:mirrors/windowsappsdk-samples.git
mirrors
windowsappsdk-samples
windowsappsdk-samples
main

搜索帮助