How to Dump WPF control as an object (as opposed to rendering)

I'm going to ask and answer this one as I've just discovered.

Scenario - you want to inspect the properties of a WPF control, rather than have it render as normal.

Answer - just giving the Dump method a depth ensures that you get the object table instead.

var btn = new Button() { Content = "Hello" };
btn.Dump(1);
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!