KeepLines Class

Defines the KeepLines Class.When the object is serialized out as xml, its qualified name is w:keepLines.

Inheritance Hierarchy

System.Object
  DocumentFormat.OpenXml.OpenXmlElement
    DocumentFormat.OpenXml.OpenXmlLeafElement
      DocumentFormat.OpenXml.Wordprocessing.OnOffType
        DocumentFormat.OpenXml.Wordprocessing.KeepLines

Namespace:  DocumentFormat.OpenXml.Wordprocessing
Assembly:  DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll)

Syntax

'Declaration
Public Class KeepLines _
    Inherits OnOffType
'Usage
Dim instance As KeepLines
public class KeepLines : OnOffType

Remarks

[ISO/IEC 29500-1 1st Edition]

17.3.1.14 keepLines (Keep All Lines On One Page)

This element specifies that when rendering this document in a page view, all lines of this paragraph are maintained on a single page whenever possible.

This means that if the contents of the current paragraph would normally span across two pages due to the placement of the paragraph's text, all lines in this paragraph shall be moved onto the next page to ensure they are displayed together. If this is not possible because all lines in the paragraph would exceed a single page in any case, then lines in this paragraph shall start on a new page, with page breaks as needed afterwards.

If this element is omitted on a given paragraph, its value is determined by the setting previously set at any level of the style hierarchy (i.e. that previous setting remains unchanged). If this setting is never specified in the style hierarchy, then this property shall not be applied.

[Example: Consider a WordprocessingML document in which a code fragment (such as the schema fragments in this document) are defined such that they should never be broken across a page boundary in order to improve readability. This constraint would be specified using the following paragraph properties in WordprocessingML:

<w:pPr>
  <w:keepLines />
  …
</w:pPr>

This setting ensures that the schema fragment is displayed on one page if possible. end example]

Parent Elements

pPr (§17.3.1.26); pPr (§17.3.1.25); pPr (§17.7.5.2); pPr (§17.7.6.1); pPr (§17.9.23); pPr (§17.7.8.2)

This element’s content model is defined by the common boolean property definition in §17.17.4.

© ISO/IEC29500: 2008.

Thread Safety

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

See Also

Reference

KeepLines Members

DocumentFormat.OpenXml.Wordprocessing Namespace