-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Issus 4908 port save file dialog designer and folder browser dialog designer #9682
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
Changes from all commits
483607f
bcb0db8
94833b1
29aaca6
c0c8c64
6cb097a
6229438
2e4dc0c
f56fc4f
7ef8ebf
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| // Licensed to the .NET Foundation under one or more agreements. | ||
| // The .NET Foundation licenses this file to you under the MIT license. | ||
|
|
||
| using System.ComponentModel.Design; | ||
|
|
||
| namespace System.Windows.Forms.Design; | ||
|
|
||
| internal class FolderBrowserDialogDesigner : ComponentDesigner | ||
| { | ||
| // Overridden to avoid setting the default property ("SelectedPath") | ||
| // to the Site.Name (i.e. folderBrowserDialog1). | ||
| protected override bool SetTextualDefaultProperty => false; | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -94,7 +94,7 @@ public unsafe DialogResult ShowDialog(IWin32Window? owner) | |
| } | ||
|
|
||
| // Retrieve the path from the IDList. | ||
| PWSTR selectedPath = default; | ||
| PWSTR selectedPath = pDisplayName; | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why is this change for?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't know why the value was set to "default" before, but the default value always points to "0", and when I set the property value, such as FolderBrowerDialog's SelectedPath, an exception occurs. Compare with the code with NexFx, the selectedPath should use pDisplayName pointer. |
||
| PInvoke.SHGetPathFromIDList(browseHandle, selectedPath); | ||
| DirectoryPath = new string((char*)selectedPath); | ||
| return DialogResult.OK; | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| // Licensed to the .NET Foundation under one or more agreements. | ||
| // The .NET Foundation licenses this file to you under the MIT license. | ||
|
|
||
| using System.ComponentModel.Design; | ||
|
|
||
| namespace System.Windows.Forms.Design; | ||
|
|
||
| internal class SaveFileDialogDesigner : ComponentDesigner | ||
| { | ||
| // Overridden to avoid setting the default property ("FileName") | ||
| // to the Site.Name (i.e. saveFileDialog1). | ||
| protected override bool SetTextualDefaultProperty => false; | ||
| } |

Uh oh!
There was an error while loading. Please reload this page.