流文档概述。

 

TextElement 的类所使用的内容模型,以及其他非 TextElement 类如何适应该模型进行了汇总。

RichTextBox 的流内容。

  1. 下图是上述关系图中的相应一部分。

    到此为止,标记可能类似于所示内容。

     
  2. Table 相对应的一部分。

    下面是相应的标记。

     
  3. Inline 元素)只能包含纯文本。

     

下面是标记中的完整示例。

 

TextElement 派生的类可以使用以下三个不同的集合:

  • TextBlock 元素允许使用的子内容。

  • Figure 元素允许使用的子内容。

  • List 中的特定内容项。

下面的示例演示如何使用 Inline 属性来操作 Span 的内容。

注意

表概述。

Span 的子内容。

Span spanx = new Span();
spanx.Inlines.Add(new Run("A bit of text content..."));
spanx.Inlines.Add(new Run("A bit more text content..."));

Span 的开始位置。

Run runx = new Run("Text to insert...");
spanx.Inlines.InsertBefore(spanx.Inlines.FirstInline, runx);

Inline 元素。

spanx.Inlines.Remove(spanx.Inlines.LastInline);

 

Inline 元素)。

spanx.Inlines.Clear();

 

TextElement 类,可以用来显示本概述中描述的内容。

Underline.

TextElement 的其他类型。

WPF 内容模型。

相关文章:

  • 2022-12-23
  • 2021-07-08
  • 2021-08-29
  • 2022-12-23
  • 2021-12-17
  • 2021-11-20
  • 2022-12-23
  • 2021-08-19
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-01-21
  • 2021-07-10
  • 2022-12-23
  • 2021-10-21
  • 2020-10-12
相关资源
相似解决方案