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 に答える