Serializing WPF DataTemplates and {Binding Expressions} (from PowerShell?)?

That's a good thought. In my test case, the {} are being inserted in the C# Main() method just for the purpose of avoiding such differences ... and I deliberately used Console. WriteLine so they're not "output" that will be parsed by PowerShell at all.

– Jaykul Mar 24 '10 at 6:34.

I am a little bit confused about the TypeConverter setup you're doing in XamlHelper's type initializer. What is BindingConverter supposed to do? Are you intending for the {Binding} markup extension to be handled the way it normally does in WPF?

In any case, markup extensions cannot round trip through XAML which is by design. The following excerpt from an MSDN page regarding XAML serialization limitations: Common references to objects made by various markup extension formats, such as StaticResource or Binding, will be dereferenced by the serialization process. These were already dereferenced at the time that in-memory objects were created by the application runtime, and the Save logic does not revisit the original XAML to restore such references to the serialized output.

This potentially freezes any databound or resource obtained value to be the value last used by the run-time representation, with only limited or indirect ability to distinguish such a value from any other value set locally. Images are also serialized as object references to images as they exist in the project, rather than as original source references, losing whatever filename or URI was originally referenced. Even resources declared within the same page are seen serialized into the point where they were referenced, rather than being preserved as a key of a resource collection Given that, I'm not sure why on earth it should even work at all in a compiled application.

But as I said, I must admit I am not sure what you're doing with the TypeConverter so maybe you've already addressed the above limitation.

The BindingConverter provides the save logic for the binding expression (without caring about the "source" per-se), which for now, is perfect for what I'm doing ... since we want to set the source later anyway. – Jaykul Mar 24 '10 at 6:29 Incidentally, the BindingCustomTypeDescriptor and BindingTypeDescriptionProvider actually do attempt to serialize the source in case it's a static-reference, but I haven't really got any useful examples of where I would use that (ie: where it would make sense to round-trip that), so I'm not really using it at the moment. – Jaykul Mar 24 '10 at 6:29 Check these for more details on BindingConverter - codeproject.Com/KB/WPF/xamlwriterandbinding.

Aspx and social.msdn.microsoft. Com/Forums/en-US/wpf/thread/… – akjoshi Jul 8 '10 at 7:17.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions