Movatterモバイル変換


[0]ホーム

URL:


Skip to main content

This browser is no longer supported.

Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.

Download Microsoft EdgeMore info about Internet Explorer and Microsoft Edge
Table of contentsExit editor mode

What's new in WPF for .NET 8

Feedback

In this article

WPF adds hardware acceleration and a new control for browsing and selecting folders in .NET 8.

Hardware acceleration

Previously, all WPF applications that were accessed remotely had to use software rendering, even if the system had hardware rendering capabilities. .NET 8 adds an option that lets you opt into hardware acceleration for Remote Desktop Protocol (RDP).

Hardware acceleration refers to the use of a computer's graphics processing unit (GPU) to speed up the rendering of graphics and visual effects in an application. This can result in improved performance and more seamless, responsive graphics. In contrast, software rendering relies solely on the computer's central processing unit (CPU) to render graphics, which can be slower and less effective.

To opt in, set theSwitch.System.Windows.Media.EnableHardwareAccelerationInRdp configuration property totrue in aruntimeconfig.json file. For more information, seeHardware acceleration in RDP.

OpenFolderDialog

WPF includes a new dialog box control calledOpenFolderDialog. This control lets app users browse and select folders. Previously, app developers relied on third-party software to achieve this functionality.

var openFolderDialog = new OpenFolderDialog(){    Title = "Select folder to open ...",    InitialDirectory = Environment.GetFolderPath(        Environment.SpecialFolder.ProgramFiles)};string folderName = "";if (openFolderDialog.ShowDialog()){    folderName = openFolderDialog.FolderName;}

For more information, seeWPF File Dialog Improvements in .NET 8 (.NET blog).

Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, seeour contributor guide.

Feedback

Was this page helpful?

YesNoNo

Need help with this topic?

Want to try using Ask Learn to clarify or guide you through this topic?

Suggest a fix?

  • Last updated on

In this article

Was this page helpful?

YesNo
NoNeed help with this topic?

Want to try using Ask Learn to clarify or guide you through this topic?

Suggest a fix?