Tuesday, November 24, 2009

Pro WPF in C# 2008 - PopUps

After way to much WPF experimentation and searching the web for answers, I finally broke down and bought the book Pro WPF in C# 2008 and I have to say it was worth every penny.  I'm only 200 pages in and it has already clarified and crystallized a great deal that was tremendously fuzzy from the rudimentary coverage in Pro C# 2008 and the .NET Platform (okay, the author did encourage me to get the book). Let me just use this space to add some things I have noticed in my reading.  Here is the first:

Disappearing PopUp

On page 201-202, the book provides a  PopUp example.  When I tried to execute this example my PopUp would initially appear and then disappear correctly (when clicking on the window), but then I couldn't get it to re-appear!  After doing some experimentation I postulated that the issue might be that the IsOpen property was still set to "true" and this was preventing a show event from firing when the IsOpen property is set again (because it is not really changing).  When I added "popLink.IsOpen=false;" on the line above "popLink.IsOpen=true;" it seemed to solve the problem.

No comments:

Post a Comment