Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a WPF equivalent to a DOM explorer?

Tags:

.net

wpf

When I'm drawing a layout on a webpage, using CSS, there can be dozens of rules, scattered across dozens of files, that could possibly influence how an element is actually displayed. Which is why the DOM explorers are such critical tools - I can select an element on a browser and see exactly what CSS rules are being applied to it.

In WPF, there can again be many rules - styles and templates and inline attributes and settings injected from the code-behind - that could possibly be interacting to determine how a given element is displayed.

Is there a way for me to look at an element, say a ComboBox, and to quickly determine exactly why it is drawing three times as tall as I think it should?

like image 910
Jeff Dege Avatar asked Dec 21 '11 20:12

Jeff Dege


1 Answers

  • Snoop - The WPF Spy Utility
  • Mole - Visualizer With Property Editing

Personally, I use Snoop. I'm not familiar with Mole, but I heard it is "better" (subjective), though it isn't free. There is a trick to working with Snoop though, if you have a window created that isn't the main window, you can target it by doing a Ctrl+Shift+MouseOver (that actually targets the current visual control). This took me awhile to figure out, and knowing that is super useful!

like image 148
myermian Avatar answered Oct 04 '22 11:10

myermian