Skip to content

WPF is a .NET Core UI framework for building Windows desktop applications. wpf-test contains test infrastructure and test collateral for the WPF framework.

License

Notifications You must be signed in to change notification settings

dipeshmsft/wpf-test

 
 

Repository files navigation

Windows Presentation Foundation (WPF) Test

Build Status MIT License

Windows Presentation Foundation (WPF) is a UI framework for building Windows desktop applications. WPF supports a broad set of application development features, including an application model, resources, controls, graphics, layout, data binding and documents. WPF uses the Extensible Application Markup Language (XAML) to provide a declarative model for application programming.

WPF applications are based on a vector graphics architecture. This enables applications to look great on high DPI monitors, as they can be infinitely scaled. WPF also includes a flexible hosting model, which makes it straightforward to host a video in a button, for example. The visual designer provided in Visual Studio makes it easy to build WPF application, with drag-in-drop and/or direct editing of XAML markup.

See the WPF Roadmap to learn about project priorities, status and ship dates.

WinForms is another UI framework for building Windows desktop applications that is supported on .NET. WPF and WinForms applications only run on Windows. They are part of the Microsoft.NET.Sdk.WindowsDesktop SDK. You are recommended to use the most recent version of Visual Studio to develop WPF and WinForms applications for .NET.

WPF for ARM64 is new for .NET 6.0 and is supported by NET 6.0 and later.

To build the WPF repo and contribute features and fixes for .NET 6.0, the most recent Visual Studio Preview is required.

Getting started

Status

  • We are currently developing WPF for .NET 8.
  • We have completed publishing WPF sources. You can learn more about this at dotnet/wpf#2554.

See the WPF roadmap to learn about the schedule for specific WPF components.

We have published few tests and have limited coverage for PRs at this time as a result. We will add more tests, however, it will be a progressive process.

The Visual Studio WPF designer is now available as part of Visual Studio 2019 and later.

How to Engage, Contribute and Provide Feedback

Some of the best ways to contribute are to try things out, file bugs, join in design conversations, and fix issues.

.NET Framework issues

Issues with .NET Framework, including WPF, should be filed on VS developer community, or Product Support. They should not be filed on this repo.

Relationship to .NET Framework

This code base is a fork of the WPF code in the .NET Framework. .NET Core 3.0 was released with a goal of WPF having parity with the .NET Framework version. Over time, the two implementations may diverge.

The Update on .NET Core 3.0 and .NET Framework 4.8 provides a good description of the forward-looking differences between .NET Core and .NET Framework.

This update states how going forward .NET Core is the future of .NET. and .NET Framework 4.8 will be the last major version of .NET Framework.

Code of Conduct

This project uses the .NET Foundation Code of Conduct to define expected conduct in our community. Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting a project maintainer at [email protected].

Running tests locally

In order to run the tests on your local machine,

  • Build the tests with build.cmd script. Use /help parameter to check the different arguments that can be passed along with the build command.
  • cd into $(RepoRoot)\publish\test\$(Configuration)\$(Platform)\Test and run RunDrts.cmd to run the tests. You can use /Area and /Name parameters to run tests from a specific area or with a certain name.

At the end of the run, you should see something like this:

  A total of 98 test Infos were processed, with the following results.
   Passed: 98
   Failed (need to analyze): 0
   Failed (with BugIDs): 0
   Ignore: 0

If there were any failures, run the tests manually with the /debugtests flag using the RunDrts.cmd script. Note that you do not run the RunDrtsDebug script, as this will debug the test infrastructure, QualityVault. When you pass the /debugtests flag, a cmd window will open where you can open the test executable in Visual Studio and debug it. When the cmd pops up, you will see instructions for debugging using a few different commands, however these commands will enable you to debug the Simple Test Invocation executable, sti.exe, which simply launches the test executable you are most likely interested in debugging. Using DrtXaml.exe as an example, this is how you can debug the test executable. Any MSBuild style properties should be replaced with actual values:

  1. $(RepoRoot)\artifacts\test\$(Configuration)\$(Platform)\Test\RunDrts.cmd /name=DrtXaml /debugtests
  2. Enter following command into the cmd window that pops up: "%ProgramFiles%\Microsoft Visual Studio\2022\Preview\Common7\IDE\devenv.exe" DrtXaml.exe
  3. Once Visual Studio is open, go to Debug-> DrtXaml Properties and do the following:
    • Manually change the Debugger Type from Auto to Mixed (CoreCLR).
    • Change the Environment from Default to a custom one that properly defines the DOTNET_ROOT variable so that the host is able to locate the install of Microsoft.NETCore.App.
      • x86 (Default): Name: DOTNET_ROOT(x86) Value: $(RepoRoot).dotnet\x86
      • x64 (/p:Platform=x64): Name: DOTNET_ROOT Value: $(RepoRoot).dotnet
  4. From there you can F5 and the test will execute.

NOTE: Some tests require the screen resolution to be set to 1920 x 1080.

NOTE: This requires being run from an admin window at the moment.

Reporting security issues and security bugs

Security issues and bugs should be reported privately, via email, to the Microsoft Security Response Center (MSRC) [email protected]. You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Further information, including the MSRC PGP key, can be found in the Security TechCenter.

Also see info about related Microsoft .NET Core and ASP.NET Core Bug Bounty Program.

License

.NET (including the WPF repo) is licensed under the MIT license.

.NET Foundation

.NET WPF is a .NET Foundation project.

See the .NET home repo to find other .NET-related projects.

Contributing

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

About

WPF is a .NET Core UI framework for building Windows desktop applications. wpf-test contains test infrastructure and test collateral for the WPF framework.

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 96.9%
  • PowerShell 0.8%
  • Smalltalk 0.8%
  • Shell 0.4%
  • XSLT 0.4%
  • C++ 0.3%
  • Other 0.4%