StoryFragments StoryFragments StoryFragments StoryFragments Class

定义

表示一组元素,其中包含一个或多个 StoryFragment 元素。Represents a set of one or more StoryFragment elements.

public ref class StoryFragments : System::Collections::Generic::IEnumerable<System::Windows::Documents::DocumentStructures::StoryFragment ^>, System::Windows::Markup::IAddChild
[System.Windows.Markup.ContentProperty("StoryFragmentList")]
public class StoryFragments : System.Collections.Generic.IEnumerable<System.Windows.Documents.DocumentStructures.StoryFragment>, System.Windows.Markup.IAddChild
type StoryFragments = class
    interface IAddChild
    interface seq<StoryFragment>
    interface IEnumerable
Public Class StoryFragments
Implements IAddChild, IEnumerable(Of StoryFragment)
继承
StoryFragmentsStoryFragmentsStoryFragmentsStoryFragments
属性
实现

示例

下面的示例演示如何StoryFragments XPSXPS在文档中使用元素。The following example shows how to use of the StoryFragments element in an XPSXPS document.

<StoryFragments
      xmlns="http://schemas.microsoft.com/xps/2005/06/documentstructure"
      xmlns:x="http://schemas.microsoft.com/xps/2005/06/documentstructure" 
      xmlns:my="clr-namespace:MyCompany.MyProduct>

  <StoryFragment FragmentType="Header">
    <ParagraphStructure>
      <NamedElement NameReference="Pg1HeaderP1" />
    </ParagraphStructure>
  </StoryFragment>

  <StoryFragment StoryName="DocumentBody" FragmentType="Content">
    <SectionStructure>
      <ParagraphStructure>
        <NamedElement NameReference="Pg1Heading1" />
      </ParagraphStructure>

      <ParagraphStructure>
        <NamedElement NameReference="Pg1P1" />
      </ParagraphStructure>

      <ParagraphStructure>
        <NamedElement NameReference="Pg1P2" />
      </ParagraphStructure>

      <ParagraphStructure>
        <NamedElement NameReference="Pg1P3" />
      </ParagraphStructure>

      <ParagraphStructure>
        <NamedElement NameReference="Pg1P4" />
      </ParagraphStructure>

      <ParagraphStructure>
        <NamedElement NameReference="Pg1P5" />
      </ParagraphStructure>

      <ParagraphStructure>
        <NamedElement NameReference="Pg1Heading2" />
      </ParagraphStructure>

      <ParagraphStructure>
        <NamedElement NameReference="Pg1P6" />
      </ParagraphStructure>

      <ParagraphStructure>
        <NamedElement NameReference="Pg1P7" />
      </ParagraphStructure>

      <TableStructure>
        <TableRowGroupStructure>

          <TableRowStructure>
            <TableCellStructure>
              <ParagraphStructure>
                <NamedElement NameReference="R1C1P1" />
              </ParagraphStructure>
            </TableCellStructure>
            <TableCellStructure>
              <ParagraphStructure>
                <NamedElement NameReference="R1C2P1" />
              </ParagraphStructure>
            </TableCellStructure>
          </TableRowStructure>

          <TableRowStructure>
            <TableCellStructure>
              <ParagraphStructure>
                <NamedElement NameReference="R2C1P1" />
              </ParagraphStructure>
            </TableCellStructure>
            <TableCellStructure>
              <ParagraphStructure>
                <NamedElement NameReference="R2C2P1" />
              </ParagraphStructure>
              <ParagraphStructure>
                <NamedElement NameReference="R2C2P2" />
              </ParagraphStructure>
            </TableCellStructure>
          </TableRowStructure>

          <TableRowStructure>
            <TableCellStructure>
              <ParagraphStructure>
                <NamedElement NameReference="R3C1P1" />
              </ParagraphStructure>
            </TableCellStructure>
            <TableCellStructure>
              <ParagraphStructure>
                <NamedElement NameReference="R3C2P1" />
              </ParagraphStructure>
            </TableCellStructure>
          </TableRowStructure>

          <TableRowStructure>
            <TableCellStructure>
              <ParagraphStructure>
                <NamedElement NameReference="R4C1P1" />
              </ParagraphStructure>
            </TableCellStructure>
            <TableCellStructure>
              <ParagraphStructure>
                <NamedElement NameReference="R4C2P1" />
              </ParagraphStructure>
            </TableCellStructure>
          </TableRowStructure>

          <TableRowStructure>
            <TableCellStructure>
              <ParagraphStructure>
                <NamedElement NameReference="R5C1P1" />
              </ParagraphStructure>
            </TableCellStructure>
            <TableCellStructure>
              <ParagraphStructure>
                <NamedElement NameReference="R5C2P1" />
              </ParagraphStructure>
            </TableCellStructure>
          </TableRowStructure>

        </TableRowGroupStructure>
      </TableStructure>
    </SectionStructure>
  </StoryFragment>

  <StoryFragment FragmentType="Footer">
    <ParagraphStructure>
      <NamedElement NameReference="Pg1FooterP1" />
    </ParagraphStructure>
    <ParagraphStructure>
      <NamedElement NameReference="Pg1FooterP2" />
    </ParagraphStructure>
  </StoryFragment>

</StoryFragments>

注解

元素定义的结构和内容FixedPageStoryFragmentsA StoryFragments element defines the structure and content of a FixedPage.

StoryFragments一个或多个StoryFragment元素的根。StoryFragments is the root of one or more StoryFragment elements.

有关的文档结构的XPSXPS详细信息, 请参阅可从Windows 硬件开发人员中心下载的XML 纸张规范 (XPS) 的第9章和附录 E。For detailed information about the document structure of XPSXPS, see Chapter 9 and Appendix E of the XML Paper Specification (XPS) that can be downloaded from the Windows Hardware Developer Central.

构造函数

StoryFragments() StoryFragments() StoryFragments() StoryFragments()

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

方法

Add(StoryFragment) Add(StoryFragment) Add(StoryFragment) Add(StoryFragment)

StoryFragment 添加到 StoryFragments 集合中。Adds a StoryFragment to the StoryFragments collection.

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

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

(Inherited from Object)
GetHashCode() GetHashCode() GetHashCode() GetHashCode()

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

(Inherited from Object)
GetType() GetType() GetType() GetType()

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

(Inherited from Object)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

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

(Inherited from Object)
ToString() ToString() ToString() ToString()

返回表示当前对象的字符串。Returns a string that represents the current object.

(Inherited from Object)

显式界面实现

IAddChild.AddChild(Object) IAddChild.AddChild(Object) IAddChild.AddChild(Object) IAddChild.AddChild(Object)

将子对象添加到 StoryFragments 中。Adds a child object to the StoryFragments.

IAddChild.AddText(String) IAddChild.AddText(String) IAddChild.AddText(String) IAddChild.AddText(String)

将节点的文本内容添加到对象。Adds the text content of a node to the object.

IEnumerable.GetEnumerator() IEnumerable.GetEnumerator() IEnumerable.GetEnumerator() IEnumerable.GetEnumerator()

未实现此 API。This API is not implemented.

IEnumerable<StoryFragment>.GetEnumerator() IEnumerable<StoryFragment>.GetEnumerator() IEnumerable<StoryFragment>.GetEnumerator() IEnumerable<StoryFragment>.GetEnumerator()

未实现此 API。This API is not implemented.

扩展方法

CopyToDataTable<T>(IEnumerable<T>) CopyToDataTable<T>(IEnumerable<T>) CopyToDataTable<T>(IEnumerable<T>) CopyToDataTable<T>(IEnumerable<T>)

在给定其泛型参数 TDataTable 的输入 DataRow 对象的情况下,返回包含 IEnumerable<T> 对象副本的 DataRowReturns a DataTable that contains copies of the DataRow objects, given an input IEnumerable<T> object where the generic parameter T is DataRow.

CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption) CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption) CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption) CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption)

在给定其泛型参数 TDataRow 的输入 DataTable 对象的情况下,将 IEnumerable<T> 对象复制到指定的 DataRowCopies DataRow objects to the specified DataTable, given an input IEnumerable<T> object where the generic parameter T is DataRow.

CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption, FillErrorEventHandler) CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption, FillErrorEventHandler) CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption, FillErrorEventHandler) CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption, FillErrorEventHandler)

在给定其泛型参数 TDataRow 的输入 DataTable 对象的情况下,将 IEnumerable<T> 对象复制到指定的 DataRowCopies DataRow objects to the specified DataTable, given an input IEnumerable<T> object where the generic parameter T is DataRow.

Cast<TResult>(IEnumerable) Cast<TResult>(IEnumerable) Cast<TResult>(IEnumerable) Cast<TResult>(IEnumerable)

IEnumerable 的元素强制转换为指定的类型。Casts the elements of an IEnumerable to the specified type.

OfType<TResult>(IEnumerable) OfType<TResult>(IEnumerable) OfType<TResult>(IEnumerable) OfType<TResult>(IEnumerable)

根据指定类型筛选 IEnumerable 的元素。Filters the elements of an IEnumerable based on a specified type.

AsParallel(IEnumerable) AsParallel(IEnumerable) AsParallel(IEnumerable) AsParallel(IEnumerable)

启用查询的并行化。Enables parallelization of a query.

AsQueryable(IEnumerable) AsQueryable(IEnumerable) AsQueryable(IEnumerable) AsQueryable(IEnumerable)

IEnumerable 转换为 IQueryableConverts an IEnumerable to an IQueryable.

Ancestors<T>(IEnumerable<T>) Ancestors<T>(IEnumerable<T>) Ancestors<T>(IEnumerable<T>) Ancestors<T>(IEnumerable<T>)

返回元素集合,其中包含源集合中每个节点的上级。Returns a collection of elements that contains the ancestors of every node in the source collection.

Ancestors<T>(IEnumerable<T>, XName) Ancestors<T>(IEnumerable<T>, XName) Ancestors<T>(IEnumerable<T>, XName) Ancestors<T>(IEnumerable<T>, XName)

返回经过筛选的元素集合,其中包含源集合中每个节点的上级。Returns a filtered collection of elements that contains the ancestors of every node in the source collection. 集合中仅包括具有匹配 XName 的元素。Only elements that have a matching XName are included in the collection.

DescendantNodes<T>(IEnumerable<T>) DescendantNodes<T>(IEnumerable<T>) DescendantNodes<T>(IEnumerable<T>) DescendantNodes<T>(IEnumerable<T>)

返回源集合中每个文档和元素的子代节点的集合。Returns a collection of the descendant nodes of every document and element in the source collection.

Descendants<T>(IEnumerable<T>) Descendants<T>(IEnumerable<T>) Descendants<T>(IEnumerable<T>) Descendants<T>(IEnumerable<T>)

返回元素集合,其中包含源集合中每个元素和文档的子代元素。Returns a collection of elements that contains the descendant elements of every element and document in the source collection.

Descendants<T>(IEnumerable<T>, XName) Descendants<T>(IEnumerable<T>, XName) Descendants<T>(IEnumerable<T>, XName) Descendants<T>(IEnumerable<T>, XName)

返回经过筛选的元素集合,其中包含源集合中每个元素和文档的子代元素。Returns a filtered collection of elements that contains the descendant elements of every element and document in the source collection. 集合中仅包括具有匹配 XName 的元素。Only elements that have a matching XName are included in the collection.

Elements<T>(IEnumerable<T>) Elements<T>(IEnumerable<T>) Elements<T>(IEnumerable<T>) Elements<T>(IEnumerable<T>)

返回源集合中每个元素和文档的子元素的集合。Returns a collection of the child elements of every element and document in the source collection.

Elements<T>(IEnumerable<T>, XName) Elements<T>(IEnumerable<T>, XName) Elements<T>(IEnumerable<T>, XName) Elements<T>(IEnumerable<T>, XName)

返回源集合中经过筛选的每个元素和文档的子元素集合。Returns a filtered collection of the child elements of every element and document in the source collection. 集合中仅包括具有匹配 XName 的元素。Only elements that have a matching XName are included in the collection.

InDocumentOrder<T>(IEnumerable<T>) InDocumentOrder<T>(IEnumerable<T>) InDocumentOrder<T>(IEnumerable<T>) InDocumentOrder<T>(IEnumerable<T>)

返回节点集合(其中包含源集合中的所有节点),并按文档顺序排列。Returns a collection of nodes that contains all nodes in the source collection, sorted in document order.

Nodes<T>(IEnumerable<T>) Nodes<T>(IEnumerable<T>) Nodes<T>(IEnumerable<T>) Nodes<T>(IEnumerable<T>)

返回源集合中每个文档和元素的子节点集合。Returns a collection of the child nodes of every document and element in the source collection.

Remove<T>(IEnumerable<T>) Remove<T>(IEnumerable<T>) Remove<T>(IEnumerable<T>) Remove<T>(IEnumerable<T>)

将源集合中的每个节点从其父节点中移除。Removes every node in the source collection from its parent node.

适用于