I have a navigation view pattern in UWP app with a "navigation root" page hosting a frame for child pages. If I call a ContentDialog
from a child page, I can still access objects in the master page if I use keyboard shortcuts. This can easily result in an app crash if another content dialog is opened.
How can I make ContentDialog
truly modal?
Project demonstrating the issue can be found here: https://github.com/under3415/NavigationApp
In a nutshell, create two pages, one hosting the other in a frame
<Frame Grid.Row="1" x:Name="RootContentFrame"/>
In a master page, have a Button
or another object with AccessKey
defined.
In a child page, call a ContentDialog
. While content dialog is open press ALT
key and then the access key. Even though the modal dialog is open, the object behind fires.