popups not Snoopable?

Jun 11, 2010 at 10:12 PM

I have a control with a Windows.Controls.Primitive.Popup on it resizing strangely. Wanting to see why... I tried to Snoop it. But while I see everything from the base application down to the textbox it's coming off of, I can't actually see the popup anywhere.

Is there a way to Snoop popups which I'm missing?

Jun 11, 2010 at 10:55 PM
Edited Jun 11, 2010 at 10:56 PM

I just tried it and it works just fine.

I thought maybe that you might have to set StaysOpen (on the Popup) to true so that you can mouse over it (without it collapsing) ... but you don't even have to do that. Snoop works on Popups both for StaysOpen = false and StaysOpen = true (the Popup doesn't collapse unless you mouse down somewhere).

Note that Popup(s) aren't part of the same visual tree ... from where they are popping up ... and that you must use the ctrl-shift mouse trick over the Popup ... before Snoop will refresh the tree view and load the visual tree for the Popup.

Maybe you are unaware of the ctrl-shift, mouse trick? If you hold down the ctrl and shift keys and then mouse over the visuals in a WPF application, Snoop will find the element in the tree view that the mouse is over.

Hope that helps.

Jun 11, 2010 at 11:13 PM

Ah, perfect. That does find exactly what I was trying to find. I didn't know the cool ctrl+shift mouse-over trick. Thanks.

And finding it showed me the cause of the weirdness, so I'm happy. Thank you, Sir.

Jun 12, 2010 at 1:04 AM

Wonderful ... and glad it was that simple.

I do plan on working on the documentation area of http://snoopwpf.codeplex.com/ ... and adding a 'tip' feature so that users of Snoop can learn about its features.

Check out http://blois.us/Snoop/ ... as it has some information on how to use it ... just scroll down a little.