StoryBreak Class

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

Namespace: System.Windows.Documents.DocumentStructures
Assembly: PresentationFramework (in presentationframework.dll)

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

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.

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

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

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0

Community Additions

ADD
Show: