dotnet/winforms

RootFolder property doesn't work for modernize ForderBrowserDialog

Open

#3,290 opened on 2020年5月15日

GitHub で見る
 (7 comments) (0 reactions) (0 assignees)C# (922 forks)batch import
:beetle: bughelp wanted

Repository metrics

Stars
 (4,100 stars)
PR merge metrics
 (平均マージ 14d 22h) (30d で 56 merged PRs)

説明

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

コントリビューターガイド