0

将以下文本放置在 XAML 中流文档段落的内联中,会使单词“charge”变为粗体。但是使用 xmlreader.ReadInnerXml 从 xml 文件中读取相同的文本什么也不做。

离子和电子对这种电荷流动的电阻导致等离子体的欧姆加热。

如何使单词变粗?

'Part of the code reading the xml file and displaying the content in a flowdocument
    x.ReadToFollowing("Paragraph")
     Dim b As String = x.ReadInnerXml
     paragraph.Inlines.Add(b)
     flowdocument.Blocks.Add(paragraph)
     flowdocumentscrollviewer.Document=flowdocument

部分xml文件:

<HelpDocuments>
  <ICPCanvas1Help Num="1">
     <Paragraph Color="Black" FontWeight="Normal" Alignment="0" FontSize="14">
 This interaction causes the ions and electrons
within the coil to flow in the closed annular paths
shown in the window. The resistance of the ions and
electrons to this flow of<Run FontWeight="Bold"> charge </Run> causes ohmic heating of
the plasma.      
    </Paragraph>
  </ICPCanvas1Help>
</HelpDocuments>
4

1 回答 1

0

在要加粗的单词周围添加以下标签。

<Run FontWeight="bold">charge</Run>

于 2013-04-02T20:50:14.003 回答