Visual Studio's Live Visual Tree is great for inspecting UI elements. But how can I inspect a tooltip in my application?
I turn on "Enable Selection" in the mini-toolbar that appears that the top of my WPF application's window, but with that turned on, tooltips no longer appear.
If you make the tooltip visible first, it will disappear when you move the mouse to the mini-toolbar.
So this is a Catch-22. Any thoughts appreciated.
Live Visual Tree is a new feature in Visual Studio 2015, I'd say they are very late in catching up for giving tools for WPF Developers.
Please send a bug in Microsoft Connect.
I would recommend to look at Snoop The WPF Spy Utility. It will give you the ability to inspect the tooltip and it's well tested working tool.
I agree with the Snoop recommendation.
If you are new to Snoop, I would add that a valuable hidden feature is to hold down Shift+Ctrl as you hover over your app. This will allow your Snoop window to zero in on the exact element quickly, without the need to manually navigate your visual tree.
You will actually want to snoop the element that has the ToolTip property set, not the ToolTip itself. For example, if the ToolTip is on a TextBlock, simply navigate the Tree on the left (or use the Shift+Ctrl tip) to that particular TextBlock. The ToolTip itself does not need to be showing on the screen. Then on the right side in the Properties Tab, you can filter down to the ToolTip property. If the ToolTip property happens to have a binding, you can see the binding from Snoop as well.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With