Cannot access ToolTip property using Object Spy (WPF)
Hi,
I'm interested in two cases: when ToolTip is Text and when ToolTip is an object. Neither works for me.
In both cases Object Spy shows (Null Object) (don't remember the exact text). However, Snoop shows them (please see the screenshot 'test.png').
It seems like Object Spy is not able to dig into visual tree properly.
I also tried to access the tooltip manually using WPFObject but it shows the same result:
....WPFObject("Border", "", 1).WPFObject("Grid", "", 1).WPFObject("ItemsControl", "", 1).WPFObject("ContentPresenter", "", 1).WPFObject("DisplayGrid").WPFObject("LeftSideTogglePopup").WPFObject("PART_ToggleButton", "").ToolTip
WPFObject("Border", "", 1).WPFObject("Grid", "", 1).WPFObject("ItemsControl", "", 1).WPFObject("ContentPresenter", "", 1).WPFObject("DisplayGrid").WPFObject("LeftSideTogglePopup").WPFObject("ToggleButton", "", 1).ToolTip
1) How can I solve this issue?
2) Is it possible to find a control by x:Name in the visual tree?
This limits our team in testing dynamically set tooltips.
Thanks,
Andrii