我将富文本存储在具有完整 RTF 标记的数据库中,如下所示:
{\rtf1\fbidis\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset0 Tahoma;}}
{\colortbl ;\red0\green0\blue0;}
\viewkind4\uc1\pard\ltrpar\cf1\f0\fs17 Email sent on 10/1...
我想让这个文本成为 WPF FlowDocument 的来源。当我直接将此文本添加到段落中时,我会看到文档中的所有标记。
fd = New FlowDocument
p = New Paragraph()
p.FontSize = 12
p.Foreground = Brushes.Black
p.FontWeight = FontWeights.Normal
p.Inlines.Add(New Run(vVariableWithRTFTagsInIt))
fd.Blocks.Add(p)
如何告诉 FlowDocument 我正在添加标记的 RTF?谢谢你。