The UWP Notepad Project (Redux): App Close Confirmation (Premium)
![](https://www.thurrott.com/wp-content/uploads/sites/2/2020/07/uwp8-hero.jpg)
Premium
![](https://www.thurrott.com/wp-content/uploads/sites/2/2020/07/uwp8-hero.jpg)
Today, I finally tried something I should have tried months ago: I simply started a new project to see whether I could prevent the user from closing that app by displaying a prompt. And it worked. On the first try.
That was confusing, given how much time I’ve spent on this task. But it gave me the opportunity to copy and paste the relevant code between this new app and the UWP version of .NETpad. And when I did that, it also worked: I was able to prevent the user from closing the app by displaying a prompt if there was unsaved data.
With technology shaping our everyday lives, how could we not dig deeper?
Thurrott Premium delivers an honest and thorough perspective about the technologies we use and rely on everyday. Discover deeper content as a Premium member.