忽略 XamlWriter.Save 中的不可序列化对象
我有一堆 WPF 控件需要转储到 xaml。某些控件包含存储在其 Tag 属性中的不可序列化对象。我需要在保存 Xaml 期间忽略它们,因为我需要布局本身,但 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 error that states that they are not serializable.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
更多
发布评论
评论(1)
要忽略属性,
请查看这篇文章:http:// /blogs.msdn.com/b/mikehillberg/archive/2006/09/16/xamlwriter.aspx
To ignore a property add
Check out this article: http://blogs.msdn.com/b/mikehillberg/archive/2006/09/16/xamlwriter.aspx