WidowControl Class
Defines the WidowControl Class.When the object is serialized out as xml, its qualified name is w:widowControl.
Inheritance Hierarchy
System.Object
DocumentFormat.OpenXml.OpenXmlElement
DocumentFormat.OpenXml.OpenXmlLeafElement
DocumentFormat.OpenXml.Wordprocessing.OnOffType
DocumentFormat.OpenXml.Wordprocessing.WidowControl
Namespace: DocumentFormat.OpenXml.Wordprocessing
Assembly: DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll)
Syntax
'Declaration
Public Class WidowControl _
Inherits OnOffType
'Usage
Dim instance As WidowControl
public class WidowControl : OnOffType
Remarks
[ISO/IEC 29500-1 1st Edition]
17.3.1.44 widowControl (Allow First/Last Line to Display on a Separate Page)
This element specifies whether a consumer shall prevent a single line of this paragraph from being displayed on a separate page from the remaining content at display time by moving the line onto the following page.
When displaying a paragraph in a page, it is sometimes the case that the first line of that paragraph would display as the last line on one page, and all subsequent lines would display on the following page. This property ensures that a consumer shall move the single line to the following page as well to prevent having one line on its own page. As well, if a single line appears at the top of a page, a consumer shall move the preceding line onto the following page as well, to prevent a single line from being displayed on a separate page.
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 paragraph shall prevent a single line from being shown on a separate page whenever it would normally occur.
[Example: Consider a document with a paragraph which must be shown on four lines at display time. If this paragraph would normally be laid out with its first line at the bottom of one page, and its following lines on the next page, as follows:
This property would ensure that the default behavior for each paragraph prevented this, by moving this line onto the following paragraph as follows:
However, if this default is overridden by specifying the following WordprocessingML:
<w:pPr> <w:widowControl w:val="off" /> </w:pPr>
The specifying of the widowControl element with value off means that the consumer displaying this document must not move the first line onto a separate page if it would be separated from all other lines (the first picture above). 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.