-
Notifications
You must be signed in to change notification settings - Fork 961
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RootFolder property doesn't work for modernize ForderBrowserDialog #3290
Comments
This issue is now marked as "up for grabs", and we’re looking for a community volunteer to work on this issue. If we receive no interest in 120 days, we will close the issue. To learn more about how we handle feature requests, please see our documentation. Happy Coding! |
The code is hooked up for RootFolder only when https://learn.microsoft.com/en-us/windows/win32/api/shobjidl_core/nn-shobjidl_core-ifileopendialog |
Could this be mapped to DefaultFolder in the new API? Or does DefaultFolder already have a separate property? Probably needs some experimentation to figure out a "good" mapping for the user experience. |
I suspect there might be another interface for a folder dialog. |
I'm aware of the differences, I was just adding another option to the discussion, depending on how strongly people want to map the semantics of the user experience. In my opinion RootFolder is less of a limiting functionality (since it runs under your own user account you could easily escape the limitation by creating an appropriate folder link) but it is more of a scoping functionality for the user experience, pointing the user to where they are supposed to start looking, especially since the tree will start collapsed by default it feels very much like a "starting point", so DefaultFolder seemed like worth considering for mapping the user experience. It all depends on how the API is supposed to work - do you want a general purpose API that does a "best effort" of mapping the user experience - or do you want maximum control over the available features in each supported version? In the latter case your comment of the property not applying to the new version of the dialog is obviously more appropriate, and you only get appropriately detailed control by fully exposing each versions API directly instead of mixing everything into one API that tries to unify completely different concepts. |
I don't really have a feeling either way. But I think the winforms team has a policy of exposing the functionality available in the WinAPIs as faithfully as possible. |
.NET Core Version:
.Net Core 5.0 from master branch: 5.0.100-preview.5.20262.7
Have you experienced this same bug with .NET Framework?: No
Minimal repro:
Actual behavior:
![image](./?url=aHR0cHM6Ly91c2VyLWltYWdlcy5naXRodWJ1c2VyY29udGVudC5jb20vMjY0NzQ0NDkvODIwMTcyNTAtNDhhMTUxMDAtOTZiNS0xMWVhLTkyYjQtY2M1MWI3NGU1MzgwLnBuZw==&__proxy_form=0)
RootFolder property setting doesn't work, please see following screenshot:
Expected behavior:
![image](./?url=aHR0cHM6Ly91c2VyLWltYWdlcy5naXRodWJ1c2VyY29udGVudC5jb20vMjY0NzQ0NDkvODIwMTcwNjItZTA1MjZmODAtOTZiNC0xMWVhLTgzYmEtODZiNjhhMzMwODIwLnBuZw==&__proxy_form=0)
RootFolder should be changed in modernize folderBrowserDialog, see below screenshot in old folderBrowserDialog(.Net Framework behavior)
The text was updated successfully, but these errors were encountered: