Serialization of Bindings

Bindings added programmatically to objects do not appear to be serialized using the xaml parser. Is there any mechanism to do this?

Thanks

Ron @ Mobiform

[161 byte] By [RonDeSerranno-MOBIFORM] at [2008-2-26]
# 1

In the September CTP, there's an enum, forget what exactly it's called -- SerializationMode? ExpressionMode? Something like that. Value means evaluate the binding and right out that resulting value, Expression means right out something kind of like the {Binding} statement.

That said, we're phasing out everything but Value -- there's a lot of cases SaveAsXml can't support "expression" serialization because the data just doesn't exist at runtime (e.g., the StaticResource example) or doesn't have any serializable representation (e.g., programmatically setting binding.Source to a non-serializable object). We'll make this change in the upcoming Beta 2 release -- not coincidentally, that's also the first release where serialization will look through TypeDescriptors, which gives designer tools a chance to influence serialization.

NickKramer at 2007-9-9 > top of Msdn Tech,Visual Studio Orcas,Windows Presentation Foundation (WPF)...

Visual Studio Orcas

Site Classified