Fix issue 14624: [PropertyGrid] FolderNameEditor does not use the modern FolderBrowserDialog#14635
Open
SimonZhao888 wants to merge 2 commits into
Open
Fix issue 14624: [PropertyGrid] FolderNameEditor does not use the modern FolderBrowserDialog#14635SimonZhao888 wants to merge 2 commits into
SimonZhao888 wants to merge 2 commits into
Conversation
…ern FolderBrowserDialog
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the WinForms design-time FolderNameEditor used by PropertyGrid so it uses System.Windows.Forms.FolderBrowserDialog (which supports the modern/Vista-style folder picker when AutoUpgradeEnabled is enabled), and adjusts related design-time editors and tests accordingly.
Changes:
- Replaced the legacy
FolderNameEditor.FolderBrowserusage withFolderBrowserDialog, and updated returned path handling to useSelectedPath. - Updated
SelectedPathEditor/InitialDirectoryEditoroverrides to match the newInitializeDialogsignature. - Refactored/updated unit + UI integration tests and adjusted shipped public API text for the signature change.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/System.Windows.Forms.Design/src/System/Windows/Forms/Design/FolderNameEditor.cs | Switches the editor implementation to FolderBrowserDialog and updates InitializeDialog signature. |
| src/System.Windows.Forms.Design/src/System/Windows/Forms/Design/SelectedPathEditor.cs | Updates override to configure the new dialog type. |
| src/System.Windows.Forms.Design/src/System/Windows/Forms/Design/InitialDirectoryEditor.cs | Updates override to configure the new dialog type. |
| src/System.Windows.Forms.Design/src/PublicAPI.Shipped.txt | Updates the shipped API entry for FolderNameEditor.InitializeDialog. |
| src/System.Windows.Forms.Design/tests/UnitTests/System/Windows/Forms/Design/FolderNameEditorTests.cs | Refactors unit tests around the new dialog type/signature. |
| src/test/integration/UIIntegrationTests/FolderNameEditorTests.cs | Updates UI integration test to use FolderBrowserDialog / SelectedPath. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
LeafShi1
reviewed
Jun 11, 2026
LeafShi1
left a comment
Member
There was a problem hiding this comment.
Thanks for the PR! I have a few concerns — see inline comments.
LeafShi1
reviewed
Jun 11, 2026
LeafShi1
reviewed
Jun 11, 2026
LeafShi1
reviewed
Jun 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #14624
Proposed changes
Customer Impact
Regression?
Risk
Screenshots
Before
14624-before.mp4
After
14624.mp4
Test methodology
Test environment(s)