Export (0) Print
Expand All

StoryBreak Class

Identifies the start or end of story composed of one or more StoryFragment elements.

System.Object
  System.Windows.Documents.DocumentStructures.BlockElement
    System.Windows.Documents.DocumentStructures.StoryBreak

Namespace:  System.Windows.Documents.DocumentStructures
Assembly:  PresentationFramework (in PresentationFramework.dll)
XMLNS for XAML: Not mapped to an xmlns.

public class StoryBreak : BlockElement
<StoryBreak .../>

The StoryBreak type exposes the following members.

  NameDescription
Public methodStoryBreakInitializes a new instance of the StoryBreak class.
Top

  NameDescription
Public methodEquals(Object)Determines whether the specified object is equal to the current object. (Inherited from Object.)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public methodGetHashCodeServes as the default hash function. (Inherited from Object.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)
Top

A StoryBreak can only be a child element of a StoryFragment. Additionally, a StoryBreak can only be the first child, last child, or both the first and last child elements in a StoryFragment. The location of the StoryBreak element in a StoryFragment indicates if the story is contained in additional fragments, and if the additional fragments either precede or follow the current fragment.

A StoryBreak as the first element in a StoryFragment indicates the start of a story.

    <!-- Fragment 1 -->
    <StoryFragment>
      <StoryBreak />   <!-- Identifies the start of a story when          -->
                       <!-- immediately after an opening <StoryFragment>. -->
      <ParagraphStructure>
        <NamedElement NameReference="a" />
        <NamedElement NameReference="b" />
      </ParagraphStructure>
    </StoryFragment>   <!-- Story continues in the next <StoryFragment>.  -->

A StoryBreak as the last element in a StoryFragment indicates the end of a story.

    <!-- Fragment 2 -->
    <StoryFragment>    <!-- Story continued from prior <StoryFragment>.    -->
      <ParagraphStructure>  
        <NamedElement NameReference="c" />
      </ParagraphStructure>
      <StoryBreak />   <!-- Identifies the end of a story when             -->
                       <!-- immediately before a closing </StoryFragment>. -->
    </StoryFragment>

A story that is contained in a single StoryFragment will have two StoryBreak elements as the first and last child elements of the fragment.

    <!-- Fragments 1 and 2 Merged -->
    <ParagraphStructure>
      <NamedElement NameReference="a" />
      <NamedElement NameReference="b" />
      <NamedElement NameReference="c" />
    </ParagraphStructure>

StoryFragment elements that are entirely contained on one page will start and end with StoryBreak elements since the content is completely contained in a single fragment.

The position of StoryBreak elements in a StoryFragment is useful when you want to access content in either forward or reverse direction in the document. For example when merging fragments in forward order, a StoryFragment that ends with a StoryBreak indicates the end of the story and that there are no more fragments to merge. Similarly when merging story fragments in reverse order, a StoryFragment that starts with a StoryBreak indicates the start of the story and that there are no prior fragments to merge.

The ability to process story fragments in either forward or reverse directions is important for many application uses. For example, a paragraph that spans page breaks is divided into multiple story fragments, one fragment for each page. A user interface that provides a triple-click feature to select and copy a whole paragraph to the clipboard must be able to merge multiple story fragments when a paragraph spans multiple pages. Additionally if the user triple-clicks on part of a paragraph that starts on the first page, the application must identify that the StoryFragment starts with a StoryBreak but does not end with a StoryBreak. This would indicate that the StoryFragment that is contained on the next page must be loaded and added to the end of the current fragment. Similarly if the user triple-clicks on part of the paragraph located on the last page, the application must identify that the StoryFragment ends with a StoryBreak but does not begin with a StoryBreak. This would indicate that the StoryFragment that is contained on previous page must be loaded and added to the start of the current fragment. The application should also be able to process both forward and reverse directions for the case of large paragraphs that span three or more pages and where the user's selection point is on an inner page.

Since a StoryFragment is limited to a single page, the use of StoryBreak elements allow each StoryFragment to contain well-formed XML but still have a hierarchical structure across an entire document.

.NET Framework

Supported in: 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Show:
© 2014 Microsoft