OpenFileDialog on .NET Core

Vinicius Gualberto picture Vinicius Gualberto · Oct 17, 2017 · Viewed 14.3k times · Source

On .NET Framework you can use System.Windows.Forms.OpenFileDialog for open files with the native Windows UI but that only works on Windows.

There is a System.Windows.Forms.OpenFileDialog implementation for .Net Core or another alternative?

Answer

mm8 picture mm8 · May 17, 2019

Since .NET Core added support for Windows desktop applications, WPF and Windows Forms applications that target .NET Core can use the OpenFileDialog and SaveFileDialog APIs exactly the same way as they would do in the .NET Framework.

These APIs have been ported to the Windows specific desktop packs that sit on top of .NET Core 3 and later.