当打开新的文本文档时,我想附加它 [英] When opening the new textdocument i want to append it
本文介绍了当打开新的文本文档时,我想附加它的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好
我只想在每次打开新文本文档时将内容附加到richtextbox控件中.有人可以告诉我该怎么做吗?
Hi all
I just want to append the content in richtextbox control each time when i open the new text document.Can anyone tell me how to do?
range = new TextRange(RichTextControl.Document.ContentEnd, RichTextControl.Document.ContentEnd);
fStream = new FileStream(path, FileMode.OpenOrCreate);
range.Load( fStream, DataFormats.Rtf);
fStream.Close();
问候
Froxy
regards
Froxy
推荐答案
打开fStream后,您应该可以搜索到末尾.
类似于:fStream.Seek(0,SeekOrigin.End);
Once you open the fStream, you should be able to seek to the end.
something like: fStream.Seek(0, SeekOrigin.End);
这篇关于当打开新的文本文档时,我想附加它的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文