dotnet/winforms

RootFolder property doesn't work for modernize ForderBrowserDialog

Open

#3290 aperta il 15 mag 2020

Vedi su GitHub
 (7 commenti) (0 reazioni) (0 assegnatari)C# (922 fork)batch import
:beetle: bughelp wanted

Metriche repository

Star
 (4100 star)
Metriche merge PR
 (Merge medio 14g 22h) (56 PR mergiate in 30 g)

Descrizione

  • .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:

  1. Create a Winforms .Net Core Application
  2. Add following code to show modernize folderBrowserDialog and set its RootFolder property to specific Folder
        public Form1()
        {
            InitializeComponent();
            FolderBrowserDialog folderBrowserDialog = new FolderBrowserDialog();
            **folderBrowserDialog.RootFolder = Environment.SpecialFolder.CommonStartMenu;**
            folderBrowserDialog.ShowDialog();
        }
    
  3. Build and run application

Actual behavior: RootFolder property setting doesn't work, please see following screenshot: image

Expected behavior: RootFolder should be changed in modernize folderBrowserDialog, see below screenshot in old folderBrowserDialog(.Net Framework behavior) image

Guida contributor