title: result from Await DisplayAlert Xamarin.Forms
body: <p><strong>Xamarin</strong> has awaitable <code>DisplayAlert</code> method which returns <code>Task&lt;bool&gt;</code>.</p>
  
  <p>I have <code>static</code> class <code>Helpers</code> where i want to write code like this:</p>
  
  <pre><code>public static bool DisplayAlert(string title, string message, string accept, string cancel){
      //return answer from Page.DisplayAlert(title, message, accept, cancel);
  }
  </code></pre>
  
  <p>This method will be called from other parts of the app like:</p>
  
  <pre><code>public ... SomeMethod(){
      // some code
      bool result = DisplayAlert(...);
      // some code
  }
  </code></pre>
  
  <p>I want to avoid <code>async/await</code> in <code>SomeMethod</code>. (How you can wait a response from a user asynchronously?!!!!!!) </p>
  
  <p>I tried  <code>await Page.DisplayAlert(...)</code>, <code>task.Wait()</code> and another. But <code>Task</code> was executed asynchronously with no return value. Or application freezes forever without displaying <code>DisplayAlert</code>.</p>
  
  <p>How to do it? What's the best practice?</p>