diff --git a/src/Eto/Forms/Form.cs b/src/Eto/Forms/Form.cs
index e17fc5217..782d9f314 100755
--- a/src/Eto/Forms/Form.cs
+++ b/src/Eto/Forms/Form.cs
@@ -97,6 +97,18 @@ public void Show()
base.Visible = true;
}
}
+
+ ///
+ /// Shows the form with a task that can be awaited until it is closed
+ ///
+ /// Task that completes when the form is closed.
+ public Task ShowAsync()
+ {
+ var tcs = new TaskCompletionSource();
+ Closed += (sender, e) => tcs.TrySetResult(true);
+ Show();
+ return tcs.Task;
+ }
///
/// Interface handler for the control
diff --git a/test/Eto.Test/UnitTests/Forms/FormTests.cs b/test/Eto.Test/UnitTests/Forms/FormTests.cs
index 578275f46..c5c299a51 100644
--- a/test/Eto.Test/UnitTests/Forms/FormTests.cs
+++ b/test/Eto.Test/UnitTests/Forms/FormTests.cs
@@ -7,13 +7,7 @@ public class FormTests : WindowTests