Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I was able to get around this using an <code>Action</code> delegate as a callback for when the <code>MessageDialog</code> is closed.</p> <p>The key is to call the Action after an <code>await</code> on <code>MessageDialog</code>'s <code>ShowAsync</code> in an <code>async</code> function.</p> <p>Another key is to Close and Open your popup to get the <code>IsLightDismissEnabled</code> to actually take hold.</p> <p>XAML:</p> <pre class="lang-xml prettyprint-override"><code>&lt;Popup IsLightDismissEnabled="{Binding IsLightDismiss, Mode=TwoWay}" IsOpen="{Binding IsPopupOpen, Mode=TwoWay}"&gt; </code></pre> <p>ViewModel:</p> <pre class="lang-csharp prettyprint-override"><code>private bool isPopupOpen; public bool IsPopupOpen { get { return this.isPopupOpen; } set { this.SetProperty(ref this.isPopupOpen, value); } } private bool isLightDismiss; public bool IsLightDismiss { get { return this.isLightDismiss; } set { this.SetProperty(ref this.isLightDismiss, value); } } protected void ShowDialog() { this.IsLightDismiss = false; this.IsPopupOpen = false; this.IsPopupOpen = true; Action showPopup = () =&gt; { this.IsLightDismiss = true; this.IsPopupOpen = false; this.IsPopupOpen = true; }; ShowMessageDialog("message", "title", showPopup); } </code></pre> <pre class="lang-csharp prettyprint-override"><code>private async void ShowMessageDialog(string message, string title, Action callback) { var _messageDialog = new MessageDialog(message, title); await _messageDialog.ShowAsync(); callback(); } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload