Skip to content

Commit 1eb372d

Browse files
committed
Reset new dialog properties
1 parent 2fb70e0 commit 1eb372d

File tree

2 files changed

+4
-14
lines changed

2 files changed

+4
-14
lines changed

src/Microsoft.DotNet.Wpf/src/PresentationFramework/Microsoft/Win32/CommonItemDialog.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -562,9 +562,12 @@ private void Initialize()
562562
_itemNames = null;
563563
_title.Value = null;
564564
_initialDirectory.Value = null;
565+
_defaultDirectory.Value = null;
566+
_rootDirectory.Value = null;
565567

566568
// Set this to an empty list so callers can simply add to it. They can also replace it wholesale.
567569
CustomPlaces = new List<FileDialogCustomPlace>();
570+
ClientGuid = null;
568571
}
569572

570573
private bool HandleItemOk(IFileDialog dialog)

src/Microsoft.DotNet.Wpf/src/PresentationFramework/Microsoft/Win32/OpenFileDialog.cs

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -205,17 +205,7 @@ public bool Multiselect
205205
/// Gets or sets a value indicating whether the dialog
206206
/// contains a read-only check box.
207207
/// </summary>
208-
public bool ShowReadOnly
209-
{
210-
get
211-
{
212-
return _showReadOnly;
213-
}
214-
set
215-
{
216-
_showReadOnly = false;
217-
}
218-
}
208+
public bool ShowReadOnly { get; set; }
219209

220210
#endregion Public Properties
221211

@@ -307,9 +297,6 @@ private void Initialize()
307297
//
308298
//---------------------------------------------------
309299
//#region Private Fields
310-
311-
private bool _showReadOnly = false;
312-
313300
//#endregion Private Fields
314301
}
315302
}

0 commit comments

Comments
 (0)