0

I've got a strange behavior when showing a ContentDialog. When the dialog is on screen and I drag the StatusBar down, the dialog disappears.

private ContentDialog _connectivityDialog = new ContentDialog { IsPrimaryButtonEnabled = false, IsSecondaryButtonEnabled = false, Title = "Test"};

Somewhere I just call _connectivityDialog.ShowAsync();

I made a simple project to reprduce this behavior: https://www.dropbox.com/sh/0a6ad5xtrzii7sx/AADnbF9TGpfJnV9xnVG4FQMJa?dl=0

Any idea why this happens?

Daniel Z.
  • 324
  • 1
  • 11

1 Answers1

1

I found the solution while investigating for another problem:

BackButton dismisses the dialog.

Solution:

_connectivityDialog.Closing += (sender, args) =>
            {
                args.Cancel = true;
            };

But be aware that the Hide()-Method is also affected. You can do a workaround like on this post: How to prevent the ContentDialog from closing when home key is pressed in Windows phone 8.1..?

Community
  • 1
  • 1
Daniel Z.
  • 324
  • 1
  • 11