What would be the best way to go about creating 'popup panels' like Blend does when you click on one of the tools on the left side In Blends case it looks like it's a Menu but I'd like to be able to have any Control magically appear, allow the user to interact with it, and then disappear.
For example, I have a color rectangle in my app. If the user clicks on it, i'd like a color selector control to magically appear. The user can then interact with the control and then click anywhere outside of the control to close it. Is something like this built into WPF I've tried just manually creating a control but I'm having trouble with getting the popup to automatically close when the user clicks anywere else. Hooking both LostFocus and LostKeyboardFocus sometimes work but I can't get them to be realiable.

Creating popup panels like Blend
Jamie Thomson
I just implemented my popup ( thanks for the pointer! ) and don't see any performance issues on Vista. My popup is quite simple, without any drop shadows or anything
Boris Mueller
Thanks. In what way to context menus not work in vista
Danny Tuppeny
I thought I'd add some example images to give a better idea what I'm after. In my app I have a grid with a tool pane on the left.
When the user clicks on particular items, a 'popup' region should appear. Clicking either the close button, anywhere not on the popup itself, or the app losing focus should close the popup.
I guess it's kind of like a menu with richer menu items that allow direct interaction.
AlexBB
Takes time to open the menu, close the menu, change background when hovering, animations go slow etc etc.
Simply bad performance...
Read more here:
http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=1159381&SiteID=1
voila jacques
I don't know what you mean with inline images but if it is what i think it is you should try BB-code, it's standard on all forums, like this:
[ img]http://fddflmdf.jpg[ /img]
but without the spaces in the []
Anyway, a normal ContextMenu should do the trick since you can style them like any other control. And they behave just the way you want them to, except for the closebutton but that's simple to add.
Too bad WPF contextmenus doesn't work on windows vista