Click here to Skip to main content
11,720,731 members (54,582 online)
Click here to Skip to main content

Tagged as

TIP: Handling WPF DialogResult with simplicity

, 28 Jun 2010 CPOL 6.5K 2
May be this is better?if (f.ShowDialog() ?? false) { // ebat' melkosoft za takie prikoly}


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

18 Jun 2010
Andrew Rissing
Or even...if (frm.ShowDialog() == true){ // do something here}
26 Jul 2010
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 }


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


About the Author

South Africa South Africa
No Biography provided

| | Privacy | Terms of Use | Mobile
Web01 | 2.8.150901.1 | Last Updated 28 Jun 2010
Article Copyright 2010 by Thornik
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid