Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Snoop doesn't see my application's child windows

Tags:

windows

wpf

snoop

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?

like image 393
Tony Vitabile Avatar asked Feb 28 '13 14:02

Tony Vitabile


2 Answers

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.

like image 150
Dana Cartwright Avatar answered Sep 29 '22 00:09

Dana Cartwright


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/

like image 42
mlemay Avatar answered Sep 29 '22 00:09

mlemay