StoryFragments Class

Definition

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)
Inheritance
StoryFragments
Attributes
Implements

Examples

The following example shows how to use of the StoryFragments element in an XPS 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>

Remarks

A StoryFragments element defines the structure and content of a FixedPage.

StoryFragments is the root of one or more StoryFragment elements.

For detailed information about the document structure of XPS, see Chapter 9 and Appendix E of the XML Paper Specification (XPS) that can be downloaded from the Windows Hardware Developer Central.

Constructors

StoryFragments()

Initializes a new instance of the StoryFragments class.

Methods

Add(StoryFragment)

Adds a StoryFragment to the StoryFragments collection.

Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
ToString()

Returns a string that represents the current object.

(Inherited from Object)

Explicit Interface Implementations

IAddChild.AddChild(Object)

Adds a child object to the StoryFragments.

IAddChild.AddText(String)

Adds the text content of a node to the object.

IEnumerable.GetEnumerator()

This API is not implemented.

IEnumerable<StoryFragment>.GetEnumerator()

This API is not implemented.

Extension Methods

CopyToDataTable<T>(IEnumerable<T>)

Returns 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)

Copies 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)

Copies DataRow objects to the specified DataTable, given an input IEnumerable<T> object where the generic parameter T is DataRow.

Cast<TResult>(IEnumerable)

Casts the elements of an IEnumerable to the specified type.

OfType<TResult>(IEnumerable)

Filters the elements of an IEnumerable based on a specified type.

AsParallel(IEnumerable)

Enables parallelization of a query.

AsQueryable(IEnumerable)

Converts an IEnumerable to an IQueryable.

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)

Returns a filtered collection of elements that contains the ancestors of every node in the source collection. Only elements that have a matching XName are included in the collection.

DescendantNodes<T>(IEnumerable<T>)

Returns a collection of the descendant nodes of every document and element in the source collection.

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)

Returns a filtered collection of elements that contains the descendant elements of every element and document in the source collection. Only elements that have a matching XName are included in the collection.

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)

Returns a filtered collection of the child elements of every element and document in the source collection. Only elements that have a matching XName are included in the collection.

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>)

Returns a collection of the child nodes of every document and element in the source collection.

Remove<T>(IEnumerable<T>)

Removes every node in the source collection from its parent node.

Applies to