在RichTextBox中显示数据库rtf数据 [英] Showing Database rtf data in richtextbox

查看:249
本文介绍了在RichTextBox中显示数据库rtf数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我编写WPF应用程序.在此应用程序中,用户从Word文档中复制数据并将其添加到richtextbox.然后,我将此数据保存在sqlite数据库中. 但是,当我从数据库中获取xaml数据并按照以下步骤进行操作

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);

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

此过程结束时,richtextbox连接一些单词,如下所示:

End of this process richtextbox concatenate some words as follow:

我不明白这里发生了什么,请帮助我.

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

现在我知道在某些PC或OS上会发生此问题.例如,我在Windows 8,Windows 8.1,Windows 10上安装了应用程序,并且运行良好.但是有些PC没有.例如:

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:

推荐答案

请参阅... stackoverflow.com/questions/829053/...也许这是您的问题!? 尽管它被称为TextRange(),但它是格式化的Text.

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

这篇关于在RichTextBox中显示数据库rtf数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆