Skip to content

Commit 2617db3

Browse files
authored
Clarify DialogHost.Close parameter documentation
The documentation for DialogHost.Close(...) described the `parameter` argument as being "to provide to close handler", which is misleading and incomplete. Internally, DialogHost.Close forwards the value directly to DialogSession.Close(parameter). In DialogSession.Close, the parameter is correctly documented as the dialog result value, which is returned by DialogHost.Show(...) and exposed through DialogClosingEventArgs.Parameter. This change aligns the DialogHost.Close documentation with the existing DialogSession.Close documentation, making it clear that the parameter represents the dialog result and is not solely intended for close handlers.
1 parent febcef3 commit 2617db3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/MaterialDesignThemes.Wpf/DialogHost.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ public static void Close(object? dialogIdentifier)
186186
/// Close a modal dialog.
187187
/// </summary>
188188
/// <param name="dialogIdentifier"> of the instance where the dialog should be closed. Typically this will match an identifier set in XAML. </param>
189-
/// <param name="parameter"> to provide to close handler</param>
189+
/// <param name="parameter"> Value returned by DialogHost.ShowDialog(...) or passed to close handler if one is provided.</param>
190190
public static void Close(object? dialogIdentifier, object? parameter)
191191
{
192192
DialogHost dialogHost = GetInstance(dialogIdentifier);

0 commit comments

Comments
 (0)