Question

When I run Snoop 2.8, it sees my program's main window and lists it in its ComboBox. However, my program creates a child window that is displayed by calling ChildWindow.Show(). No matter what I do, I can't snoop that child window. If I refresh the list of windows, it doesn't show up. If I drag the little cross hairs icon next to the binoculars over the child window, the main window comes up.

How do I Snoop my applicaton's child window?

Was it helpful?

Solution

When I use Snoop, I always first start snoop and then use the "shift+control" shortcut to focus on what I want. This seems to work even if I do it to a child window. So try this:

  1. Start application, open child window
  2. Run Snoop
  3. Snoop any window in the application
  4. Focus on your child window (click on the title bar of the window)
  5. Move the mouse over what you want to inspect, and hold down the Shift and Control keys simultaneously
  6. A red outline appears in your application, and you should see Snoop show/select the element in question in the tree. If you look up the visual tree on the left you will now see the child window is the parent of the tree.

This solution was last tested in Snoop 2.8.

OTHER TIPS

Have you ever look for WPF Inspector? I always use it instead of snoop and and never had any problem with child windows...

http://wpfinspector.codeplex.com/

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top