NamedElement 类


标识 FixedPage 下的元素层次结构中的元素。Identifies an element within the hierarchy of elements under a FixedPage.

public ref class NamedElement : System::Windows::Documents::DocumentStructures::BlockElement
public class NamedElement : System.Windows.Documents.DocumentStructures.BlockElement
type NamedElement = class
    inherit BlockElement
Public Class NamedElement
Inherits BlockElement


下面的示例演示如何在 XML 纸张规范 (XPS)XML Paper Specification (XPS) 文档中使用 ParagraphStructureFigureStructure 元素,每个元素都有一个 NamedElement 子元素。The following example shows the use of ParagraphStructure and FigureStructure elements in an XML 纸张规范 (XPS)XML Paper Specification (XPS) document, each with a NamedElement child.

  <NamedElement NameReference="Pg2Heading1" />

  <NamedElement NameReference="Pg2P1" />

  <NamedElement NameReference="Pg2P2" />

  <NamedElement NameReference="Pg2Fig1" />


XPSXPS 文档的每一页都包含一个 FixedPage 元素,该元素以位置文本运行和图形的形式定义其内容Each page of an XPSXPS document contains a FixedPage element that defines its content in the form of positional text runs and graphics. 通过使用文档结构元素,XPSXPS 文档的页面还可与用节、段落、列表、图表和表格形式定义页面结构StoryFragment 元素相关联。Through the use of document structure elements, pages of an XPSXPS document can also be associated with StoryFragment elements that define the structure of the page in the form of sections, paragraphs, lists, figures, and tables. NamedElement 类用于定义文档标记的内容和结构部分之间的关联。The NamedElement class is used to define the associations between content and structure parts of the document markup. NamedElement 是结构化元素的子元素,如位于页面 StoryFragment 层次结构中的表格单元或项目符号列表项。A NamedElement is the child of a structural element, such as a table cell or bullet list item that is located in the StoryFragment hierarchy of a page. NamedElement 标识同一页面的 FixedPage 层次结构中的项。A NamedElement identifies an item in the FixedPage hierarchy of the same page. 它引用的项是结构元素的内容。The item it refers to is the content of the structural element.

有关 XPSXPS 文档的结构元素的详细信息,请参阅可在下载的XML 纸张规范(XPS) 的第9章和附录 E。For more information about structure elements of XPSXPS documents, see Chapter 9 and Appendix E of the XML Paper Specification (XPS) available for download at



初始化 NamedElement 类的新实例。Initializes a new instance of the NamedElement class.



获取或设置为 FixedPage 父级提供内容的 NamedElement 标记层次结构中的元素的名称。Gets or sets the name of the element in the FixedPage markup hierarchy that provides the content for the parent of the NamedElement.



确定指定的对象是否等于当前对象。Determines whether the specified object is equal to the current object.

(继承自 Object)

用作默认哈希函数。Serves as the default hash function.

(继承自 Object)

获取当前实例的 TypeGets the Type of the current instance.

(继承自 Object)

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(继承自 Object)

返回一个表示当前对象的 string。Returns a string that represents the current object.

(继承自 Object)