How to create a dialog in WPF like the inspect variable dialog in in VS 2010
I would like to create a temporary dialog similar to the one Visual Studio 2010 shows when you hover in De开发者_运维百科bug Mode over a variable. You can expand into the contents of the object and a windows opens that can reach over the borders of the edit window. When the mouse leaves the border of this temporary window, it closes automatically.
I do not intend to write a debugger, I am just intersted in the technique used to create this kind of temporary window.
Does anyone know how this is done in WPF?
I've had some good success with the Adorner system in WPF. It allows you to bung an overlay virtually anywhere.
Check out the MSDN here http://msdn.microsoft.com/en-us/library/ms743737.aspx
Previously, I have created an adorner to follow the mouse during a DragDrop, to show the information I'm dragging (like dragging from iTunes).
At a guess for your program, you could capture the hover and create an adorner rather like a ToolTip.
精彩评论