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.
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:
Add the Delete button on the page by modifying the content of the
MainPage.xaml
file as follows:<Page (...)> <StackPanel Padding="20"> <Button Content="Delete" HorizontalAlignment="Center" Click=...