GemBox.Document
  • Overview
  • Examples
  • Free version
  • Support
  • Pricelist

    Show / Hide Table of Contents

    TableStyleFormatCollection Class

    Namespace:
    GemBox.Document.Tables
    Assembly:
    GemBox.Document.dll

    Represents a collection of conditional TableStyleFormats.

    • C#
    • VB.NET
    public sealed class TableStyleFormatCollection : IEnumerable<TableStyleFormat>, IEnumerable
    Public NotInheritable Class TableStyleFormatCollection
        Implements IEnumerable(Of TableStyleFormat), IEnumerable
    Inheritance:
    System.Object
    TableStyleFormatCollection
    Implements
    System.Collections.Generic.IEnumerable<TableStyleFormat>
    System.Collections.IEnumerable
    Remarks

    Table style conditional formats are applied to different regions of the table and allow you to define all formatting properties (formatting for a table, rows, cells, paragraphs and runs).

    For more information about table styles, see table styles article and table styles example.

    Properties

    Item[TableStyleFormatType]

    Gets the TableStyleFormat that corresponds to given format type.

    If TableStyleFormatCollection doesn't contain corresponding format, then new format will be added and returned.

    • C#
    • VB.NET
    public TableStyleFormat this[TableStyleFormatType formatType] { get; }
    Public ReadOnly Property Item(formatType As TableStyleFormatType) As TableStyleFormat
    Parameters
    formatType
    TableStyleFormatType

    The format type of the TableStyleFormat.

    Property Value
    TableStyleFormat

    The TableStyleFormat that corresponds to given format type.

    Remarks

    For more information about table styles, see table styles article and table styles example.

    Methods

    Add(TableStyleFormat)

    Sets the specified formats. This method is required to support C# collection initializer syntax.

    • C#
    • VB.NET
    public void Add(TableStyleFormat styleFormat)
    Public Sub Add(styleFormat As TableStyleFormat)
    Parameters
    styleFormat
    TableStyleFormat

    The style format.

    Clear()

    Clears the TableStyleFormatCollection.

    • C#
    • VB.NET
    public void Clear()
    Public Sub Clear

    Contains(TableStyleFormatType)

    Determines whether the TableStyleFormatCollection contains a TableStyleFormat instance with specific format type.

    • C#
    • VB.NET
    public bool Contains(TableStyleFormatType formatType)
    Public Function Contains(formatType As TableStyleFormatType) As Boolean
    Parameters
    formatType
    TableStyleFormatType

    Format type of the TableStyleFormat to locate in the TableStyleFormatCollection.

    Returns
    System.Boolean

    true if TableStyleFormat instance with specific format type is found in the TableStyleFormatCollection; otherwise, false.

    Remarks

    For more information about table styles, see table styles article and table styles example.

    GetEnumerator()

    Returns an enumerator that iterates through the TableStyleFormatCollection.

    • C#
    • VB.NET
    public IEnumerator<TableStyleFormat> GetEnumerator()
    Public Function GetEnumerator As IEnumerator(Of TableStyleFormat)
    Returns
    System.Collections.Generic.IEnumerator<TableStyleFormat>

    A System.Collections.Generic.IEnumerator<T> that can be used to iterate through the TableStyleFormatCollection.

    Remove(TableStyleFormatType)

    Removes the TableStyleFormat with the specified format type from the TableStyleFormatCollection.

    • C#
    • VB.NET
    public bool Remove(TableStyleFormatType formatType)
    Public Function Remove(formatType As TableStyleFormatType) As Boolean
    Parameters
    formatType
    TableStyleFormatType

    Format type of the TableStyleFormat which should be removed from the TableStyleFormatCollection.

    Returns
    System.Boolean

    true if TableStyleFormat is successfully removed; otherwise, false. This method also returns false if TableStyleFormat was not found in the TableStyleFormatCollection.

    Remarks

    For more information about table styles, see table styles article and table styles example.

    Implements

    System.Collections.Generic.IEnumerable<T>
    System.Collections.IEnumerable

    Examples

    Table styles example
    Back to top

    Facebook • Twitter • LinkedIn

    © GemBox Ltd. — All rights reserved.