Click here to Skip to main content
12,894,897 members (57,479 online)
Click here to Skip to main content
Add your own
alternative version

Tagged as

Stats

10.2K views
1 bookmarked
Posted 18 Jun 2010

TIP: Handling WPF DialogResult with simplicity

, 18 Jun 2010 CPOL
Or even...if (frm.ShowDialog() == true){ // do something here}

Alternatives

Members may post updates or alternatives to this current article in order to show different approaches or add new features.

28 Jun 2010
Thornik
May be this is better?if (f.ShowDialog() ?? false) { // ebat' melkosoft za takie prikoly}
26 Jul 2010
catbirch
if(frm.DialogR...
4 Sep 2010
Jaime Olivares
4 alternatives  
Shorter way to evaluate DialogResult after calling Window.ShowDialog
7 Sep 2010
Member 2722225
what about this one :if (new frm().ShowDialog().Equals(true)) { //do something }

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Andrew Rissing
Software Developer (Senior)
United States United States
Since I've begun my profession as a software developer, I've learned one important fact - change is inevitable. Requirements change, code changes, and life changes.

So..If you're not moving forward, you're moving backwards.

| | Privacy | Terms of Use | Mobile
Web02 | 2.8.170424.1 | Last Updated 18 Jun 2010
Article Copyright 2010 by Andrew Rissing
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid