共用方式為


CantSplit Class

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

Inheritance Hierarchy

System.Object
  DocumentFormat.OpenXml.OpenXmlElement
    DocumentFormat.OpenXml.OpenXmlLeafElement
      DocumentFormat.OpenXml.Wordprocessing.OnOffOnlyType
        DocumentFormat.OpenXml.Wordprocessing.CantSplit

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

Syntax

'Declaration
Public Class CantSplit _
    Inherits OnOffOnlyType
'Usage
Dim instance As CantSplit
public class CantSplit : OnOffOnlyType

Remarks

[ISO/IEC 29500-1 1st Edition]

17.4.6 cantSplit (Table Row Cannot Break Across Pages)

This element specifies whether the contents within the current cell shall be rendered on a single page. When displaying the contents of a table cell (such as the table cells in ISO/IEC 29500), it is possible that a page break would fall within the contents of a table cell, causing the contents of that cell to be displayed across two different pages. If this property is set, then all contents of a table row shall be rendered on the same page by moving the start of the current row to the start of a new page if necessary. If the contents of this table row cannot fit on a single page, then this row shall start on a new page and flow onto multiple pages as necessary.

If this element is not present, the default behavior is dictated by the setting in the associated table style. If this property is not specified in the style hierarchy, then this table row shall be allowed to split across multiple pages.

[Example: Consider the following content displayed on two different pages of a WordprocessingML document:

DocumentFormat.OpenXml.Wordprocessing.CantSplit-im

When this content is displayed, the contents of the 2nd table row in this document are displayed across two different pages. If the contents of this row are to be displayed on one page, then this requirement would be specified as follows:

<w:tr>
<w:trPr>
…
<w:cantSplit />
</w:trPr>
…
</w:tr>

The presence of the cantSplit element specifies that the table row must not be broken across multiple pages, therefore the second table row starts on a new page:

DocumentFormat.OpenXml.Wordprocessing.CantSplit-im

This setting therefore ensures that the content is always displayed on a single page (if it fits on one page). end example]

Parent Elements

trPr (§17.4.82); trPr (§17.7.6.10); trPr (§17.7.6.11); trPr (§17.4.83)

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

CantSplit Members

DocumentFormat.OpenXml.Wordprocessing Namespace