简体   繁体   English

将RichTextBox上的项目符号列表保存到XML

[英]save bullet list on RichTextBox to XML

This is my issue I want to save bullet style on RichTextBox on VS2010 to XML File. 这是我要在VS2010上将RichTextBox上的项目符号样式保存到XML文件的问题。 When I create content, it's ok. 当我创建内容时,没关系。 But when I save it. 但是当我保存它时。 The bullet is missing. 子弹不见了。 It's just have plain text. 它只有纯文本。 Please help me to save actually content of RichTextBox in XML File, or maybe just file.txt 请帮助我将RichTextBox的实际内容保存在XML File中,或者仅保存为file.txt

Thanks 谢谢

you can add this code 您可以添加此代码

richTextBox1.SelectionBullet = true;

You can encapsulate in your restitution 您可以将其归还给您

<ol>
 <li>returned data</li>
</ol>

A plain .TXT file isn't enough, you need to save the file using the .RTF extension (Rich Text Format). 普通的.TXT文件是不够的,您需要使用.RTF扩展名(富文本格式)保存文件。

Please call: 请打电话:

  //File path must have .RTF at the end
  richTextBox1.SaveFile(filePath);

Ensure your extension is .RTF and you will be able to save the formatted rich text box :) 确保您的扩展名是.RTF,并且您将能够保存格式的富文本框:)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM