Skip to Main Content
Programming WPF, 2nd Edition
book

Programming WPF, 2nd Edition

by Chris Sells, Ian Griffiths
August 2007
Intermediate to advanced content levelIntermediate to advanced
864 pages
25h 52m
English
O'Reilly Media, Inc.
Content preview from Programming WPF, 2nd Edition

Dialogs

Unlike the main window, where users can interact with any number of menu items, toolbar buttons, and data controls at will, a dialog is most often meant to be a short, focused conversation with the user to get some specific data before the rest of the application can continue. The File dialog is the classic example; when the application needs the name of a file, the File dialog provides a way for the user to specify it.

In Windows, dialogs were originally designed as modal (i.e., the application has entered a "mode" where the user must answer the questions posed by the dialog and click OK, or must abort the operation by clicking the Cancel button). However, it didn't take long for dialogs to need to continue running in concert with other accessible windows, leading to modeless operation, where the user can go back and forth between the dialog and other windows, using each at will. The Find dialog is the exemplar in this area. As users find something they've specified in the Find dialog, they're free to interact with that data without dismissing the Find dialog so that they can find the next thing that matches their query without starting over.

In WPF, there is no special dialog class. Dialog interactions, both modal and modeless, are provided by either the Window or the NavigationWindow (discussed in the next chapter) as you choose. However, there is built-in support for dialog-like interactions with WPF application users, including modal operation, dialog styles, and data ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Programming C#, 4th Edition

Programming C#, 4th Edition

Jesse Liberty
Programming C# 10

Programming C# 10

Ian Griffiths

Publisher Resources

ISBN: 9780596510374Supplemental ContentErrata Page