Creating a dialog box
A dialog box is a
Window that is typically used to get some data from the user, before some operation can proceed. This is sometimes referred to as a modal window (as opposed to modeless, or non-modal). In this recipe, we'll take a look at how to create and manage such a dialog box.
Make sure Visual Studio is up and running.
How to do it...
We'll create a dialog box that's invoked from the main window to request some information from the user:
- Create a new WPF application named
- Add a new
DetailsDialogclass is created).
- Visual Studio opens
DetailsDialog.xaml. Set some
Height, and make sure the ...