WPF-Samples

Repository for WPF related samples

  • 所有者: microsoft/WPF-Samples
  • 平台:
  • 許可證: MIT License
  • 分類:
  • 主題:
  • 喜歡:
    0
      比較:

Github星跟蹤圖

WPF-Samples

This repo contains the samples that demonstrate the API usage patterns and popular features for the Windows Presentation Foundation in the .NET Core for Desktop. These samples were initially hosted on MSDN, and we are gradually
moving all the interesting WPF samples over to GitHub. All the samples have been retargeted to .NET Core 3.0.

You can also find an archive of samples targeting .NET 4.7.2 in the netframework branch.

For additional WPF samples, see WPF Samples.

Please note that the documentation on the repo is still being updated, so all links might not point to the right location.

License

Unless otherwise mentioned, the samples are released under the MIT license

Help us improve our samples

Help us improve out samples by sending us a pull-request or opening a GitHub Issue

Questions: mail wpfteam@microsoft.com

WPF development

These samples require Visual Studio 2019 to build, test, and deploy, and also require the .NET Core 3 SDK.

Get a free copy of Visual Studio 2019 Community Edition with support for building WPF apps

.NET Core SDK

WPF on .NET Core 3.0 has been open-sourced, and is now available on Github

Using the samples

To use the samples with Git, clone the WPF-Samples repository with 'git clone https://github.com/microsoft/WPF-Samples'

After cloning the WPF-Samples respository, there will be two solution files in the root directory: WPF-Samples.sln and WPF-Samples.msbuild.sln

  • To build the samples, open one of the solution files in Visual Studio 2019 and build the solution.
  • Alternatively, navigate to the directory of a sample and build with 'dotnet build' or 'msbuild' specifying the target project file.
  • WPF-Samples.msbuild.sln contains projects that can be built only with msbuild or Visual Studio, and will not compile with dotnet build. These projects contain C++ code, for which there is no support in dotnet build

The easiest way to use these samples without using Git is to download the zip file containing the current version (using the link below or by clicking the "Download ZIP" button on the repo page). You can then unzip the entire archive and use the samples in Visual Studio 2019.

Download the samples ZIP

Notes:

  • Before you unzip the archive, right-click it, select Properties, and then select Unblock.
  • Most samples should work independently
  • By default, all the samples target .NET core 3.0.

For more info about the programming models, platforms, languages, and APIs demonstrated in these samples, please refer to the guidance available in MSDN. These samples are provided as-is in order to indicate or demonstrate the functionality of the programming models and feature APIs for WPF.

主要指標

概覽
名稱與所有者microsoft/WPF-Samples
主編程語言C#
編程語言C# (語言數: 8)
平台
許可證MIT License
所有者活动
創建於2015-04-15 23:35:11
推送於2025-05-02 10:38:56
最后一次提交
發布數57
最新版本名稱gallery/v1.0.1 (發布於 )
第一版名稱97174 (發布於 )
用户参与
星數5.4k
關注者數324
派生數3.2k
提交數599
已啟用問題?
問題數325
打開的問題數63
拉請求數312
打開的拉請求數1
關閉的拉請求數62
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?