This project has moved and is read-only. For the latest updates, please go here.

How to snoop the modal window ?

Feb 1, 2011 at 4:48 AM

Hi ,

I have a modal window which i wnat to snoop . but snoop utiltiy is able to show only parent window ? Is there any work around for that ?

Feb 1, 2011 at 8:11 PM

Yes, you can Snoop a modal dialog ... if you Snoop after you bring up the modal dialog. Also, please be aware that if you ctrl-shift mouse over elements in the modal dialog ... the visual tree in the Snoop UI will update and even refresh ... so you make sure you try that.

Also, please note that there is often limited keyboard support in these scenarios ... meaning ... that you might have to copy/paste text into the Snoop interface (which is annoying, I admit, but at least it works).

Mar 23, 2012 at 6:07 PM

This is not working. If I snoop even after openning the model window I see the parent one, not the child.

Mar 24, 2012 at 12:20 AM

Hi somos,

Would it be possible to attach a sample app that reproduces this issue? Or perhaps you could let us know the circumstances under which this happens. A repro app would be the most beneficial, and will probably enable us to fix the problem 100%.

Thanks for posting.

 - Maciek

Mar 26, 2012 at 11:20 PM
Edited Mar 26, 2012 at 11:21 PM


I just made a WPF Window (Window1.xaml) with a button on it that OnClick created a second empty window (Window2.xaml). On Snoop I only was able to see the Window with title Window1 whatever I did.

I have the app at work, I can summit it tomorrow, now its really lake. Where should I send it?

Mar 28, 2012 at 6:48 PM

If you could create a work item for this issue (you can do this here:, that would be totally awesome. You can attach files to work items as well. I'm glad you're corresponding because I'm curious to see what the issue is.

Mar 28, 2012 at 8:11 PM

I just figured out that an easier way to do this would be to just click on "Copy to work item" at the side, and just attach the file(s) there. Hopefully it should take about 30 seconds or so.

Mar 28, 2012 at 8:16 PM

Click this link: Copy to work item instead (This link will create the proper text for the work item as opposed to the one above - "Copy to work item" copies the comment on the left as the description, so I just used the link at the top, and pasted it here for your convenience).

Mar 28, 2012 at 8:56 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.
Mar 29, 2012 at 6:18 PM

So I downloaded the repro app, and was able to Snoop the second window just fine. First thing I did (as you probably already know) is that I snooped the window after it was shown (so I clicked on 'Button' and then snooped the second window). I then set focus to the modal dialog window, and pressed CTRL + Shift over it.

However, one thing that did happen when I did this was that the popped-up modal window went to the back of the main window after snooping the application. In fact, it seems like whenever you set focus to the snoop dialog, the popped-up modal window goes to the background (yes, I know it's annoying). Could that be the source of confusion? There were times when I myself had problems with modal windows going to the background. It just seemed like the application was in a deadlock. 

PS: I saw the Stock Analyzer application on your profile, and when I get some free time I'd like to play with it. It looks interesting.

Mar 29, 2012 at 9:53 PM

Well, after all I was able to workaround my problem as I told you on the TFS task so I haven't it anymore. Feel free to come to the Stock Analyzer project when you want but its not an application for a weekend, not sure if you know what I mean :)

Apr 16, 2012 at 10:02 PM

I'm having a similar problem but it's a bit different. When I snoop the modal window, I can't move the scrollbar and I can't drill into font colors (something that's key for me), until I close the modal window.

Our app is mostly modal windows, which means that trying to fully snoop all of our overlays is a serious chore. Any workarounds? I'm mostly looking to document font specs right now.

Apr 17, 2012 at 10:28 PM

@somos, for the record ... I also downloaded your test harness and verified that the Ctrl-Shift Mouse Over trick indeed works. In other words, I don't think you need to do such a crazy workaround ... to get at visuals in your dialog.

I also noticed that the modal dialog window switched to the background when I Snooped it.

Apr 17, 2012 at 10:38 PM

@kblock, I have had intermittent success with modal dialogs.

See my first reply in this discussion ... that is make sure you Snoop after you have brought up the dialog ... and use the Ctrl-Shift Mouse Over trick.

Where is the font color that you are trying to drill into? Is it a property on a visual ... that is on the dialog? If so, you should be able to delve (drill) into that color. If you are unable to ... I suggest that you create a test harness and attach it to an issue which you can create from this discussion (from the 'Copy to work item' link).

If the font color is on a visual on the main window ... and yet you've Snooped the dialog ... then Snoop will definitely not let you drill into that. That is definitely an unsupported scenario.

Do you understand the distinction?

Hope this helps.