XAML: writing down all values of an object?
There was a “XAML Serialization” thread on Channel 9 – Coffeehouse today that had an interesting use of XAML. He was using XAML as a way to dump the state of his object graph for verification, debugging, potential transformations/exports, etc…
As such, he wanted to see some R/O properties written down in XAML, that we currently judge as not interesting to write, since they are read-only…and thus can be read back in, so why write them.
If XamlServices.Save() (or the XamlObjectReader underneath the covers) did less filtering of properties that need to be written, then you would get the goodness of seeing things in XAML-style, but have all your data. [Also Dan Glick now has shown in that thread that you could override XamlSchemaContext to solve this]
Anyway, worth thinking about…
[the thread also discusses immutable types and the default ctor() / non-default ctor() debate.]