Click here to Skip to main content
Click here to Skip to main content

TIP: Handling WPF DialogResult with simplicity

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

License

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

About the Author

Andrew Rissing
Software Developer (Senior)
United States United States
Member
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.

Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board.
Search this forum  
    Spacing  Noise  Layout  Per page   
GeneralIndeed you don't have to declare a variable to evaluate the ... PinmemberJaime Olivares5 Sep '10 - 22:16 
GeneralWhy not "if (frm.ShowDialog())"? PinmemberSimon Dufour19 Aug '10 - 3:22 
GeneralYeah, I'm not a big fan of "if (a == true)", but at least it... PinmemberAndrew Rissing29 Jun '10 - 3:38 
GeneralYeah, that would be equivalent to Equals(true), although it ... PinmemberJaime Olivares28 Jun '10 - 20:42 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

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