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

    Show / Hide Table of Contents

    TableStyleCollection Class

    Namespace:
    GemBox.Presentation.Tables
    Assembly:
    GemBox.Presentation.dll

    Represents a collection of TableStyles.

    • C#
    • VB.NET
    public sealed class TableStyleCollection : Collection<TableStyle>, IList, ICollection, IList<TableStyle>, ICollection<TableStyle>, IEnumerable<TableStyle>, IEnumerable
    Public NotInheritable Class TableStyleCollection
        Inherits Collection(Of TableStyle)
        Implements IList, ICollection, IList(Of TableStyle), ICollection(Of TableStyle), IEnumerable(Of TableStyle), IEnumerable
    Inheritance:
    System.Object
    Collection
    Collection<TableStyle>
    TableStyleCollection
    Implements
    System.Collections.IList
    System.Collections.ICollection
    System.Collections.Generic.IList<TableStyle>
    System.Collections.Generic.ICollection<TableStyle>
    System.Collections.Generic.IEnumerable<TableStyle>
    System.Collections.IEnumerable

    Properties

    Default

    Gets or sets the default table style for newly added tables.

    • C#
    • VB.NET
    public TableStyle Default { get; set; }
    Public Property Default As TableStyle
    Property Value
    TableStyle

    The default table style for newly added tables.

    Exceptions
    System.ArgumentNullException

    Value cannot be null.

    System.ArgumentException

    The specified table style cannot be set because it doesn't belong to presentation's table styles collection.

    Methods

    Contains(TableStyleName)

    Determines whether a built-in TableStyle with the specified name is in the collection.

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

    Name of the built-in TableStyle to locate in the collection.

    Returns
    System.Boolean

    true if the built-in TableStyle with the specified name is found in the collection; otherwise, false.

    Contains(String)

    Determines whether a custom TableStyle with the specified name is in the collection.

    • C#
    • VB.NET
    public bool Contains(string styleName)
    Public Function Contains(styleName As String) As Boolean
    Parameters
    styleName
    System.String

    Name of the custom TableStyle to locate in the collection.

    Returns
    System.Boolean

    true if the custom TableStyle with the specified name is found in the collection; otherwise, false.

    Create(TableStyleName)

    Creates a new instance of a TableStyle based on a specified built-in table style.

    The created instance is not automatically added to the collection.

    • C#
    • VB.NET
    public TableStyle Create(TableStyleName builtInStyleName)
    Public Function Create(builtInStyleName As TableStyleName) As TableStyle
    Parameters
    builtInStyleName
    TableStyleName

    Name of the built-in table style whose formatting settings will be copied to a newly created table style.

    Returns
    TableStyle

    A new instance of a TableStyle based on a specified built-in table style.

    Create(String)

    Creates a new instance of a TableStyle based on a NoStyleNoGrid built-in table style and with the specified name.

    The created instance is not automatically added to the collection.

    • C#
    • VB.NET
    public TableStyle Create(string styleName)
    Public Function Create(styleName As String) As TableStyle
    Parameters
    styleName
    System.String

    Name of the created table style.

    Returns
    TableStyle

    A new instance of a TableStyle based on a NoStyleNoGrid built-in table style and with the specified name.

    GetOrAdd(TableStyleName)

    Gets or creates and adds a new built-in TableStyle with the specified name.

    • C#
    • VB.NET
    public TableStyle GetOrAdd(TableStyleName builtInStyleName)
    Public Function GetOrAdd(builtInStyleName As TableStyleName) As TableStyle
    Parameters
    builtInStyleName
    TableStyleName

    Name of the built-in TableStyle.

    Returns
    TableStyle

    An existing or a newly added instance of a built-in TableStyle.

    GetOrAdd(String)

    Gets or creates and adds a new custom TableStyle with the specified name.

    • C#
    • VB.NET
    public TableStyle GetOrAdd(string styleName)
    Public Function GetOrAdd(styleName As String) As TableStyle
    Parameters
    styleName
    System.String

    Name of the custom TableStyle.

    Returns
    TableStyle

    An existing or a newly added instance of a custom TableStyle.

    Implements

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

    See Also

    TableStyles
    Back to top

    Facebook • Twitter • LinkedIn

    © GemBox Ltd. — All rights reserved.