I'm working with UWP and I use ContentDialog to show the content. I want to prevent user dismiss dialog by press ESC button. I tried this solution but when I set the Cancel = true. I cannot handle the click event in Primary Button:
How to prevent the ContentDialog from closing when home key is pressed in Windows phone 8.1..?
Do we have any way to prevent it? My purpose is locking the screen anyway.