Поделиться через


TableStyleProperties Class

Style Conditional Table Formatting Properties.When the object is serialized out as xml, its qualified name is w:tblStylePr.

Inheritance Hierarchy

System.Object
  DocumentFormat.OpenXml.OpenXmlElement
    DocumentFormat.OpenXml.OpenXmlCompositeElement
      DocumentFormat.OpenXml.Wordprocessing.TableStyleProperties

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

Syntax

'Declaration
<ChildElementInfoAttribute(GetType(TableStyleConditionalFormattingTableProperties))> _
<ChildElementInfoAttribute(GetType(StyleParagraphProperties))> _
<ChildElementInfoAttribute(GetType(RunPropertiesBaseStyle))> _
<ChildElementInfoAttribute(GetType(TableStyleConditionalFormattingTableRowProperties))> _
<ChildElementInfoAttribute(GetType(TableStyleConditionalFormattingTableCellProperties))> _
Public Class TableStyleProperties _
    Inherits OpenXmlCompositeElement
'Usage
Dim instance As TableStyleProperties
[ChildElementInfoAttribute(typeof(TableStyleConditionalFormattingTableProperties))]
[ChildElementInfoAttribute(typeof(StyleParagraphProperties))]
[ChildElementInfoAttribute(typeof(RunPropertiesBaseStyle))]
[ChildElementInfoAttribute(typeof(TableStyleConditionalFormattingTableRowProperties))]
[ChildElementInfoAttribute(typeof(TableStyleConditionalFormattingTableCellProperties))]
public class TableStyleProperties : OpenXmlCompositeElement

Remarks

The following table lists the possible child types:

  • StyleParagraphProperties <w:pPr>

  • RunPropertiesBaseStyle <w:rPr>

  • TableStyleConditionalFormattingTableProperties <w:tblPr>

  • TableStyleConditionalFormattingTableRowProperties <w:trPr>

  • TableStyleConditionalFormattingTableCellProperties <w:tcPr>

[ISO/IEC 29500-1 1st Edition]

17.7.4.6 tblStylePr (Style Conditional Table Formatting Properties)

This element specifies a set of formatting properties which shall be conditionally applied to the parts of a table which match the requirement specified on the type attribute. These table conditional formats are applied to different regions of the table as follows:

DocumentFormat.OpenXml.Wordprocessing.TableStylePr

All rows in the table can also have conditional formatting on an alternating row/column basis as well as follows:

DocumentFormat.OpenXml.Wordprocessing.TableStylePr

When specified, these conditional formats shall be applied in the following order (therefore subsequent formats override properties on previous formats):

  • Whole table

  • Banded columns, even column banding

  • Banded rows, even row banding

  • First row, last row

  • First column, last column

  • Top left, top right, bottom left, bottom right

[Example: Consider a table style which contains conditional formatting, defined as follows:

<w:style w:type="table" w:styleId="exampleTableStyle">
…
<w:tblStylePr w:type="firstRow">
<w:tblPr>
<w:tblCellSpacing w:w="29" w:type="dxa"/>
</w:tblPr>
…
</w:tblStylePr>
</w:style>

The tblStylePr element specifies a set of table properties which must be conditionally applied to all parts of the table which meet the criteria specified by the type attribute (in this case, all heading rows for the current table). end example]

Parent Elements

style (§17.7.4.17)

Child Elements

Subclause

pPr (Table Style Conditional Formatting Paragraph Properties)

§17.7.6.1

rPr (Table Style Conditional Formatting Run Properties)

§17.7.6.2

tblPr (Table Style Conditional Formatting Table Properties)

§17.7.6.3

tcPr (Table Style Conditional Formatting Table Cell Properties)

§17.7.6.8

trPr (Table Style Conditional Formatting Table Row Properties)

§17.7.6.10

Attributes

Description

type (Table Style Conditional Formatting Type)

Specifies the section of the table to which the current conditional formatting properties shall be applied.

[Example: Consider a table style which contains conditional formatting, defined as follows:

<w:style w:type="table" >

<w:tblStylePr w:type="lastRow">

</w:tblStylePr>
</w:style>

The type attribute value of lastRow specifies that this set of conditional formatting properties must be applied to the last row of the table only. end example]

The possible values for this attribute are defined by the ST_TblStyleOverrideType simple type (§17.18.89).

[Note: The W3C XML Schema definition of this element’s content model (CT_TblStylePr) is located in §A.1. end note]

© 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

TableStyleProperties Members

DocumentFormat.OpenXml.Wordprocessing Namespace