dotnet / dotnet/winforms

Update FolderNameEditor to use modern folder dialog

Open
#4,665 4 comments 1 reaction 0 assignees View on GitHub
area-DesignerSupport help wanted
Dominant language
C#
Stars
4.9k
Forks
1.1k
Avg merge
1d 13m
Merged PRs (30d)
85

Description

**Is your feature request related to a problem? Please describe.**

As noted [here](https://github.com/dotnet/winforms/pull/4645#pullrequestreview-605774524) `FolderNameEditor` is [using interop](https://github.com/dotnet/winforms/blob/2178e7a66ed27332202659c3ea86649dc4578c3d/src/System.Windows.Forms.Design/src/System/Windows/Forms/Design/FolderNameEditor.cs#L131) for folder selection, thus still opening the legacy folder dialog. `FolderBrowserDialog` has been updated to use the more modern Vista folder dialog. It would make sense to call `FolderBrowserDialog` from `FolderNameEditor` to get the same experience in the designer.

Also the `InitialDirectory` properties on `FileDialog` and `FolderBrowserDialog` should be annotated with `FolderNameEditor` to get the proper designer experience.

**Describe the solution you'd like and alternatives you've considered**

While the native interop could be updated to use the Vista dialog it probably makes more sense to just use the existing FolderBrowserDialog?

**Will this feature affect UI controls?**
- their design time experience will be affected, but the designer should not require any changes
- runtime experience will be affected if a property grid is used at runtime
- accessibility/localization are unaffected

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.