c# - Popups in WPF immediately lose focus and close -


I'm hitting my head against a WPF popup issue, and hoping someone can help me :) Like this framework:

Our app stores a list of UIObjects - These represent elements that are displayed in a viewport 3D (via the member user object, There is a flat, square mesh with bitmap) and tree view (Member Tree Via Through Aitim).

In any case, when the object detects the right click, then it tries to open the popup, the code can be forwarded directly to:

  ContextMenu contextMenu = new ContextMenu (); // Add to the context of content menu.IsOpen = true;  

When I click in the viewport, everything works as expected - popup opens, and remains open until it does not lose focus or does not make any selection goes. In the tree view, however, popup reduces focus and closes immediately.

I have tried to set the focus, to clearly set the placement target, after marking the event before the call, and after that the popup, the pop-up "Stage Open" And marking as a dozen other things, and even then it immediately closes.

Any help would be greatly appreciated. thank you in advanced!

Ah, as it has come to know that I was complaining about this matter. Instead of manually managing the context menu, just tell it in the Trivialit's own context menu and let the system be handed over with it, this was the way to know that she would learn me thanks for input of all :)


Comments

Popular posts from this blog

c# - How to capture HTTP packet with SharpPcap -

php - Multiple Select with Explode: only returns the word "Array" -

php - jQuery AJAX Post not working -