Showing Database rtf data in richtextbox

2019-09-02 07:23发布

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:enter image description here

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: enter image description here

1条回答
淡お忘
2楼-- · 2019-09-02 07:35

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

查看更多
登录 后发表回答