Questions tagged [xaml-serialization]

6 questions
3
votes
1 answer

Ignoring non-serializable objects in XamlWriter.Save

I have a bunch of WPF controls that needs to be dumped to xaml. Some controls contain non-serializable objects stored in their's Tag property. I need to ignore them during saving Xaml, since I need layout itself, but XamlWriter.Save generates an…
LOST
  • 2,956
  • 3
  • 25
  • 40
1
vote
1 answer

Serialization Issue with WF4

I have a peculiar issue with a variable in my workflow service. It is an array of a datacontract from a REST service, ContactContract[]. When this array is empty everything is great and the workflow continues on correctly. However, if there are any…
scmccart
  • 1,169
  • 7
  • 10
1
vote
2 answers

XAMLWriter fails for DataGrid columns

I am using XAMLWriter to serialize some controls. It works well for other controls, but not for DataGrid. First thing, it can not serialize DataGrid columns, which is very annoying(if somebody has a solution, great!), so I manage to find…
Vale
  • 3,258
  • 2
  • 27
  • 43
1
vote
1 answer

TextDecorationCollection serialization in WPF

Is there any xaml serialization attribute that I can specify for a dependency property which actually is a collection (TextDecorationCollection)? I want to use serialization for cloning a very large and complex object. Here a sample of the code,…
melculetz
  • 1,961
  • 8
  • 38
  • 51
0
votes
2 answers

XAML serialization of binary string properties

I am using XamlServices as a general-purpose serialization mechanism, as described here, here and here. Although this works very well for most scenarios, I am unclear how to get it to serialize string property values that contain non-printable…
Tim Coulter
  • 8,705
  • 11
  • 64
  • 95
-2
votes
2 answers

Xaml serialization and immutable structs?

How can I do this? Tried using a TypeConverter, but the only thing I could think of was to construct the XML for the types, which doesn't quite cut it. TypeConverters in xaml serialization will escape xml and treat it like plain text. Value…
user1228