EDN Admin
Well-known member
Hello,
I would like to serialize a custom control which have a dependency property of type
XmlElement (I use XamlSerializer) :<br/>
<pre class="prettyprint public XmlElement Item{ get { return (XmlElement)GetValue(ItemProperty); } set { SetValue(ItemProperty, value); }}[/code]
However, the result is the following:
<MyCustomControl.Item><br/>
<XmlElement Prefix="" IsEmpty="True" InnerXml="" InnerText="" Value="{x:Null}" /><br/>
</MyCustomControl.Item>
And when I want to deserialize, I get an exception:
No matching constructor found on type System.Xml.XmlElement. You can use the Arguments or FactoryMethod directives to construct this type.
How can we serialize XmlElement object ?
Thanks in advance,<br/>
Josh<br/>
View the full article
I would like to serialize a custom control which have a dependency property of type
XmlElement (I use XamlSerializer) :<br/>
<pre class="prettyprint public XmlElement Item{ get { return (XmlElement)GetValue(ItemProperty); } set { SetValue(ItemProperty, value); }}[/code]
However, the result is the following:
<MyCustomControl.Item><br/>
<XmlElement Prefix="" IsEmpty="True" InnerXml="" InnerText="" Value="{x:Null}" /><br/>
</MyCustomControl.Item>
And when I want to deserialize, I get an exception:
No matching constructor found on type System.Xml.XmlElement. You can use the Arguments or FactoryMethod directives to construct this type.
How can we serialize XmlElement object ?
Thanks in advance,<br/>
Josh<br/>
View the full article