Search code examples
c#wpfopenfiledialog

Why OpenFileDialog requires Microsoft.Win32?


I program in C# WPF. In MSDN, it states that OpenFileDialog belongs to namespace System.Windows.Controls. But simply having using System.Windows.Controls does not allow me to use OpenFileDialog. I have to add using Microsoft.Win32 as well to use OpenFileDialog.

Why?


Solution

  • I suspect this is just a Silverlight documentation error/limitation.

    This .Net MSDN link correctly places the OpenFileDialog in the Microsoft.Win32 namespace.