O'Reilly logo

Windows Application Development Cookbook by Marcin Jamro

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Presenting a message dialog

There is often a necessity to confirm some operations performed by a user, for example, removing an item or placing an order. There are various ways to do this, such as using an additional message dialog. In this recipe, you will learn how to present a message dialog after pressing the Delete button and how to handle the event of choosing an option presented in this dialog.

Getting ready

To step through this recipe, you only need the automatically generated project.

How to do it...

To prepare an example that shows how to present a message dialog and handle the event of choosing an option shown within it, perform the following steps:

  1. Add the Delete button on the page by modifying the content of the MainPage.xaml file as follows: ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required