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);
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);