在Silverlight中保存和读取xml [英] save and read xml in silverlight
本文介绍了在Silverlight中保存和读取xml的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
<richtextbox acceptsreturn="True">
Margin="5"
x:Name="rbtMyRichTextBox">
<paragraph>
<inlineuicontainer>
<Image Source="Assets/logo.png" Width="100"></Image>
</inlineuicontainer>
</paragraph>
</richtextbox>
请帮助我.
Please help me.
推荐答案
您可以在
You can learn about Read and Write in XML files here Processing XML Data with XmlReader and XmlWriter (Silverlight).
So, I assume that you want to save the content of richtextbox on XML File, right?
<richtextblock x:name="rtb" xmlns:x="#unknown" />
后面的代码是这样的:
Code behind, something like this:
this.rtb.SelectAll();
var contentRich = this.rtb.SelectedText;
在上面的代码之后,将 contentRich 保存到您的XML 中.
希望对您有所帮助.
After the code above, save contentRich into your XML.
Hope it helps.
这篇关于在Silverlight中保存和读取xml的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文