diff --git a/src/System.Windows.Forms/src/System/Windows/Forms/Dialogs/TaskDialog/TaskDialog.cs b/src/System.Windows.Forms/src/System/Windows/Forms/Dialogs/TaskDialog/TaskDialog.cs
index eab6a1fbfc1..5a3e5aedda0 100644
--- a/src/System.Windows.Forms/src/System/Windows/Forms/Dialogs/TaskDialog/TaskDialog.cs
+++ b/src/System.Windows.Forms/src/System/Windows/Forms/Dialogs/TaskDialog/TaskDialog.cs
@@ -299,25 +299,25 @@ private static TaskDialogButton CreatePlaceholderButton(TaskDialogResult result)
}
///
- /// Shows the task dialog with the specified owner asynchronously.
+ /// Shows the task dialog with the specified owner asynchronously.
///
///
- /// The page instance that contains the contents which this task dialog will display.
+ /// The page instance that contains the contents which this task dialog will display.
///
///
- /// Gets or sets the position of the task dialog when it is shown.
+ /// Gets or sets the position of the task dialog when it is shown.
///
///
- ///
- /// Showing the dialog will bind the and its controls until
- /// this method returns or the dialog is navigated to a different page.
- ///
+ ///
+ /// Showing the dialog will bind the and its controls until
+ /// this method returns or the dialog is navigated to a different page.
+ ///
///
///
- /// The which was clicked by the user to close the dialog.
+ /// The which was clicked by the user to close the dialog.
///
///
- /// is .
+ /// is .
///
///
/// The specified contains an invalid configuration.
@@ -329,28 +329,28 @@ public static Task ShowDialogAsync(
=> ShowDialogAsync(IntPtr.Zero, page.OrThrowIfNull(), startupLocation);
///
- /// Shows the task dialog with the specified owner asynchronously.
+ /// Shows the task dialog with the specified owner asynchronously.
///
///
- /// The page instance that contains the contents which this task dialog will display.
+ /// The page instance that contains the contents which this task dialog will display.
///
///
- /// The owner window.
+ /// The owner window.
///
///
- /// Gets or sets the position of the task dialog when it is shown.
+ /// Gets or sets the position of the task dialog when it is shown.
///
///
- ///
- /// Showing the dialog will bind the and its controls until
- /// this method returns or the dialog is navigated to a different page.
- ///
+ ///
+ /// Showing the dialog will bind the and its controls until
+ /// this method returns or the dialog is navigated to a different page.
+ ///
///
///
- /// The which was clicked by the user to close the dialog.
+ /// The which was clicked by the user to close the dialog.
///
///
- /// is .
+ /// is .
///
///
/// The specified contains an invalid configuration.
@@ -363,28 +363,28 @@ public static Task ShowDialogAsync(
ShowDialogAsync(owner.Handle, page, startupLocation);
///
- /// Shows the task dialog with the specified owner asynchronously.
+ /// Shows the task dialog with the specified owner asynchronously.
///
///
- /// The page instance that contains the contents which this task dialog will display.
+ /// The page instance that contains the contents which this task dialog will display.
///
///
- /// The handle of the owner window, or to show a modeless dialog.
+ /// The handle of the owner window, or to show a modeless dialog.
///
///
- /// Gets or sets the position of the task dialog when it is shown.
+ /// Gets or sets the position of the task dialog when it is shown.
///
///
- ///
- /// Showing the dialog will bind the and its controls until
- /// this method returns or the dialog is navigated to a different page.
- ///
+ ///
+ /// Showing the dialog will bind the and its controls until
+ /// this method returns or the dialog is navigated to a different page.
+ ///
///
///
- /// The which was clicked by the user to close the dialog.
+ /// The which was clicked by the user to close the dialog.
///
///
- /// is .
+ /// is .
///
///
/// The specified contains an invalid configuration.
@@ -431,28 +431,28 @@ void ShowDialogProc()
}
///
- /// Shows the task dialog.
+ /// Shows the task dialog.
///
///
- /// The page instance that contains the contents which this task dialog will display.
+ /// The page instance that contains the contents which this task dialog will display.
///
///
- /// Gets or sets the position of the task dialog when it is shown.
+ /// Gets or sets the position of the task dialog when it is shown.
///
///
- ///
- /// Showing the dialog will bind the and its controls until
- /// this method returns or the dialog is navigated to a different page.
- ///
+ ///
+ /// Showing the dialog will bind the and its controls until
+ /// this method returns or the dialog is navigated to a different page.
+ ///
///
///
- /// The which was clicked by the user to close the dialog.
+ /// The which was clicked by the user to close the dialog.
///
///
- /// is .
+ /// is .
///
///
- /// The specified contains an invalid configuration.
+ /// The specified contains an invalid configuration.
///
public static TaskDialogButton ShowDialog(
TaskDialogPage page,
@@ -460,31 +460,31 @@ public static TaskDialogButton ShowDialog(
=> ShowDialog(IntPtr.Zero, page.OrThrowIfNull(), startupLocation);
///
- /// Shows the task dialog with the specified owner.
+ /// Shows the task dialog with the specified owner.
///
///
- /// The page instance that contains the contents which this task dialog will display.
+ /// The page instance that contains the contents which this task dialog will display.
///
/// The owner window, or to show a modeless dialog.
///
- /// Gets or sets the position of the task dialog when it is shown.
+ /// Gets or sets the position of the task dialog when it is shown.
///
///
- ///
- /// Showing the dialog will bind the and its controls until
- /// this method returns or the dialog is navigated to a different page.
- ///
+ ///
+ /// Showing the dialog will bind the and its controls until
+ /// this method returns or the dialog is navigated to a different page.
+ ///
///
///
- /// The which was clicked by the user to close the dialog.
+ /// The which was clicked by the user to close the dialog.
///
///
- /// is
- /// - or -
- /// is .
+ /// is
+ /// - or -
+ /// is .
///
///
- /// The specified contains an invalid configuration.
+ /// The specified contains an invalid configuration.
///
public static TaskDialogButton ShowDialog(
IWin32Window owner,
diff --git a/src/System.Windows.Forms/src/System/Windows/Forms/Form.cs b/src/System.Windows.Forms/src/System/Windows/Forms/Form.cs
index 1c609b267c3..2d759c387ad 100644
--- a/src/System.Windows.Forms/src/System/Windows/Forms/Form.cs
+++ b/src/System.Windows.Forms/src/System/Windows/Forms/Form.cs
@@ -5307,9 +5307,9 @@ public void Show(IWin32Window? owner)
/// - The form is not a top-level form.
/// - The form is trying to set itself as its own owner.
/// -
- /// Thrown if the form is already displayed asynchronously or if no
- /// could be retrieved or installed.
- ///
+ /// Thrown if the form is already displayed asynchronously or if no
+ /// could be retrieved or installed.
+ ///
/// - The operating system is in a non-interactive mode.
///
///
@@ -5560,22 +5560,22 @@ public DialogResult ShowDialog(IWin32Window? owner)
///
///
///
- /// The task will complete when the form is closed or disposed.
+ /// The task will complete when the form is closed or disposed.
///
///
- /// This method immediately returns, even if the form is large and takes a long time to be set up.
+ /// This method immediately returns, even if the form is large and takes a long time to be set up.
///
///
- /// If the form is already displayed asynchronously by , an will be thrown.
+ /// If the form is already displayed asynchronously by , an will be thrown.
///
///
- /// An will also occur if no could be retrieved or installed.
+ /// An will also occur if no could be retrieved or installed.
///
///
- /// There is no need to marshal the call to the UI thread manually if the call originates from a different thread. This is handled automatically.
+ /// There is no need to marshal the call to the UI thread manually if the call originates from a different thread. This is handled automatically.
///
///
- /// Any exceptions that occur will be automatically propagated to the calling thread.
+ /// Any exceptions that occur will be automatically propagated to the calling thread.
///
///
///
@@ -5595,22 +5595,22 @@ public DialogResult ShowDialog(IWin32Window? owner)
///
///
///
- /// The task will complete when the form is closed or disposed.
+ /// The task will complete when the form is closed or disposed.
///
///
- /// This method immediately returns, even if the form is large and takes a long time to be set up.
+ /// This method immediately returns, even if the form is large and takes a long time to be set up.
///
///
- /// If the form is already displayed asynchronously by , an will be thrown.
+ /// If the form is already displayed asynchronously by , an will be thrown.
///
///
- /// An will also occur if no could be retrieved or installed.
+ /// An will also occur if no could be retrieved or installed.
///
///
- /// There is no need to marshal the call to the UI thread manually if the call originates from a different thread. This is handled automatically.
+ /// There is no need to marshal the call to the UI thread manually if the call originates from a different thread. This is handled automatically.
///
///
- /// Any exceptions that occur will be automatically propagated to the calling thread.
+ /// Any exceptions that occur will be automatically propagated to the calling thread.
///
///
///
@@ -5640,25 +5640,25 @@ private Task ShowDialogAsyncInternal(IWin32Window? owner)
?? throw new InvalidOperationException(SR.FormOrTaskDialog_NoSyncContextForShowAsync);
syncContext.Post((state) => ShowDialogProc(
- tcsModalForm: ref _modalFormCompletion, owner: owner),
+ modalFormCompletion: ref _modalFormCompletion, owner: owner),
state: null);
return _modalFormCompletion.Task;
- void ShowDialogProc(ref TaskCompletionSource tcsModalForm, IWin32Window? owner = default)
+ void ShowDialogProc(ref TaskCompletionSource modalFormCompletion, IWin32Window? owner = default)
{
try
{
DialogResult result = ShowDialog(owner);
- tcsModalForm.SetResult(result);
+ modalFormCompletion.SetResult(result);
}
catch (Exception ex)
{
- tcsModalForm.SetException(ex);
+ modalFormCompletion.SetException(ex);
}
finally
{
- tcsModalForm = null!;
+ modalFormCompletion = null!;
}
}
}