Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
WPF Popup - Form Moved
Message
From
01/03/2008 12:28:15
 
 
To
28/02/2008 14:00:58
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Miscellaneous
Thread ID:
01295934
Message ID:
01297971
Views:
31
This message has been marked as a message which has helped to the initial question of the thread.
>>Ooof! More than I bargained for <g>
>
>hehe, ya it is a bit of code. But it's a decent start on an item that is commonly wanted and not available in WPF yet. IF we get it spiffed up I'm willing to post the finnal code.
>
>>I was intially intrigued by 'The Popup does not stay with the textbox if the window is moved' and wonder why that would be the case.
>>I think I'm well behind you on the learning curve on this one and I'm also tied up for the next couple of days but I do want to play with it when I get time....
>>Regards,
>>Viv
>
>I'm in no rush on this one.
>
>The sample code for the popup used this rather crude method in the window code. (It makes the popups flicker when you move the window.)
>
>
>void Window1_LocationChanged(object sender, EventArgs e)
>  {
>  if ((bool)showDesc.IsChecked)
>    {
>    TogglePopups(false);
>    TogglePopups(true);
>    }
>  }
>
>
>But since I want to use this as a control, I need to find a different way. Plus in this case just closing the popup when the window moves would be fine.

The above code certainly seems a bit of a kludge - but if you're happy to have the popup close then just 'TogglePopups(false);' in the event handler should do it? Of course you'd need the same behaviour for any resizing as well.

What about the Popup.StaysOpen property? Looks as if setting that to false should cause the popup to close automatically when it loses focus?
REgards,
Viv
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform