Repository for WPF related samples
Перейти к файлу
Dipesh Kumar bea5def357
Update VideoViewerDemo.csproj
2024-08-26 21:38:56 +05:30
.github/policies Added git actions for labels : 'waiting-author-feedback' and 'no-recent-activity' (#513) 2024-02-21 09:48:20 +05:30
Accessibility Added missing link (#510) 2023-12-19 16:54:50 +05:30
Animation Added missing link (#510) 2023-12-19 16:54:50 +05:30
Application Management Added missing link (#510) 2023-12-19 16:54:50 +05:30
Clipboard Added missing link (#510) 2023-12-19 16:54:50 +05:30
Compatibility Updated URLs (#509) 2023-12-19 18:01:50 +05:30
Data Binding Added missing link (#510) 2023-12-19 16:54:50 +05:30
Documents Added missing link (#510) 2023-12-19 16:54:50 +05:30
Drag and Drop Added missing link (#510) 2023-12-19 16:54:50 +05:30
Element Tree Added missing link (#510) 2023-12-19 16:54:50 +05:30
Elements Added missing link (#510) 2023-12-19 16:54:50 +05:30
Events Added missing link (#510) 2023-12-19 16:54:50 +05:30
Getting Started Updated versions in readme and proj files (#507) 2023-12-19 17:49:02 +05:30
Globalization and Localization Added missing link (#510) 2023-12-19 16:54:50 +05:30
Graphics Updated versions in readme and proj files (#507) 2023-12-19 17:49:02 +05:30
Input and Commands Added missing link (#510) 2023-12-19 16:54:50 +05:30
Migration and Interoperability Updated versions in readme and proj files (#507) 2023-12-19 17:49:02 +05:30
PerMonitorDPI Update main to .NET 8 2023-08-24 12:21:50 +05:30
Properties Added missing link (#510) 2023-12-19 16:54:50 +05:30
Resources Added missing link (#510) 2023-12-19 16:54:50 +05:30
Sample Applications Update VideoViewerDemo.csproj 2024-08-26 21:38:56 +05:30
Speech and Media Added missing link (#510) 2023-12-19 16:54:50 +05:30
Styles & Templates Added missing link (#510) 2023-12-19 16:54:50 +05:30
Threading Added missing link (#510) 2023-12-19 16:54:50 +05:30
Tools Update main to .NET 8 2023-08-24 12:21:50 +05:30
Visual Layer Added missing link (#510) 2023-12-19 16:54:50 +05:30
Windows Added missing link (#510) 2023-12-19 16:54:50 +05:30
eng Updated versions in readme and proj files (#507) 2023-12-19 17:49:02 +05:30
.DS_Store Fix Xaml FlowDocument Table crash issue. (#74) 2019-10-15 20:14:42 -07:00
.editorconfig Update ExceptionHandlingSecondaryUIThread to shutdown Dispatcher (#59) 2019-10-15 19:45:06 -07:00
.gitattributes Linguist tool configuration: exclude RTF from language stats 2021-07-09 20:33:33 +07:00
.gitignore Use simpler scheme contained in global.json for alternate SDK versions. 2019-11-13 15:56:41 -08:00
CODEOWNERS Add CODEOWNERS file that automatically includes @dotnet/wpf-developers as reviewers (#376) 2021-05-26 15:44:05 -07:00
Directory.Build.props Fix several build failures (#93) 2019-07-08 18:31:27 -07:00
LICENSE Initial commit 2015-04-15 16:35:11 -07:00
NuGet.config Merge branch 'main' into implementing-heading-level 2021-07-22 10:11:37 -07:00
README.md Updated URLs (#509) 2023-12-19 18:01:50 +05:30
SECURITY.md Microsoft mandatory file 2022-05-16 22:00:58 +00:00
WPFSamples.msbuild.sln Update samples for ARM64: build.cmd -TargetFramework net6.0-windows -Platform ARM64 2021-01-24 13:08:15 -08:00
WPFSamples.sln Added sample application on usage of common dialogs in WPF 2023-08-24 16:09:22 +05:30
azure-pipelines.yml Updated azure-pipeline to build against net8.0 2023-08-24 12:55:38 +05:30
global.json Updated versions in readme and proj files (#507) 2023-12-19 17:49:02 +05:30

README.md

WPF-Samples

This repo contains the samples that demonstrate the API usage patterns and popular features for the Windows Presentation Foundation in the .NET 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 8.0.

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

The samples in this repo are generally about illustrating specific concepts and may go against accessibility best practices. However, the team has spent some time illustrating accessibility best practices in a subset of these samples.

For additional WPF samples, see WPF Samples.

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

For .NET 8 - main branch

These samples require Visual Studio 2022(v17.8) to build, test, and deploy, and also require the most recent .NET 8 SDK.

Get a free copy of Visual Studio 2022 Community Edition

.NET 8 SDK

For .NET 7

These samples require Visual Studio 2022(v17.7), Visual Studio 2022 for Mac (v17.6) to build, test, and deploy, and also require the .NET 7 SDK.

Get a free copy of Visual Studio 2022 Community Edition

.NET 7 SDK

For .NET 6

These samples require Visual Studio 2022(v17.2), Visual Studio 2022 for Mac (v17.6) to build, test, and deploy, and also require the .NET 6 SDK.

Get a free copy of Visual Studio 2022 Community Edition

.NET 6 SDK

WPF on .NET 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 2022 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 2022.

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 8.0. (Installers for the .NET 8 SDK can be found at https://dotnet.microsoft.com/en-us/download)

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.