使用图像保存Xml文件Richtextbox [英] Save Xml File Richtextbox With Image
本文介绍了使用图像保存Xml文件Richtextbox的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在Silverlight中使用Xml文件保存RichtextBox,请...
How to Save A RichtextBox With Xml File in Silverlight,Please ...
<richtextbox acceptsreturn="True">
Margin="5"
x:Name="rbtMyRichTextBox">
<paragraph>
<inlineuicontainer>
<Image Source="Assets/logo.png" Width="100"></Image>
</inlineuicontainer>
</paragraph>
</richtextbox>
推荐答案
您可以在此处
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.
这篇关于使用图像保存Xml文件Richtextbox的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文