Skip to content

Modernize FolderBrowserDialog #1

@clairernovotny

Description

@clairernovotny

The Windows Forms FolderBrowserDialog uses an old folder picker control. Starting in Windows Vista, there is a newer COM-based control available.

My proposal is to enhance the existing FolderBrowserDialog to use that newer control by default when running on Vista and higher.

The existing API can be used, but the newer API gives us a few new options:

  1. The default location may be any folder, not just a known folder. The current API uses an enum for the RootFolder. How should we take this forward to allow a user to set the path? One option could be to document that the property has no effect if the Vista style dialogs are used. This is what Ookii dialogs does.
  2. SelectedPath has a setter, should we use that value as the default folder? Ookii uses this property as the default and then to retrieve the selection.
  3. ShowNewFolderButton is always visible on the new dialog. The doc comments can be updated to reflect this.
  4. The new dialog has a Title property. We can add that.
  5. Presumably there should be a property to allow a user to choose the original dialog. What should we call it?

Does .NET Core 3 support pre-Vista operating systems? Do we need to consider that, or can Vista detection code be removed? How about CAS and Security Demand code? Does that need to remain or be added for net-new code or can that be removed & omitted for .NET Core?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions