Showing Database rtf data in richtextbox

馋奶兔 提交于 2019-12-13 05:27:04

问题


I write WPF application. In this application user copy data from the word document and add it to richtextbox. Then I save this data in sqlite database. But when I get xaml data from data base and do following procedure

// Saving data
StringWriter wr = new StringWriter();
XamlWriter.Save(RichTextBox.Document, wr);

and

FlowDocument doc = XamlReader.Parse(*wrStringValuefromDB*) as FlowDocument;

End of this process richtextbox concatenate some words as follow:

I can't understand what is happening here, Please help me.

Now I know that this problem happens some PC or OS. For example, I install application on Windows 8, Windows 8.1, Windows 10 and it work very good. But some PC doesn't. For example:


回答1:


See ... stackoverflow.com/questions/829053/… Maybe this is your problem!? Allthough it's called TextRange() it is formatted Text.



来源:https://stackoverflow.com/questions/34434975/showing-database-rtf-data-in-richtextbox

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!