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 error that states that they are not serializable.
Asked
Active
Viewed 2,455 times
1 Answers
5
To ignore a property add
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
Check out this article: http://blogs.msdn.com/b/mikehillberg/archive/2006/09/16/xamlwriter.aspx

pr0gg3r
- 4,254
- 1
- 36
- 27