Back to Devexpress

StyleCollection.Hide(Style) Method

officefileapi-devexpress-dot-spreadsheet-dot-stylecollection-dot-hide-x28-devexpress-dot-spreadsheet-dot-style-x29.md

latest2.4 KB
Original Source

StyleCollection.Hide(Style) Method

Marks the specified style as deleted, so it can no longer be applied to cells.

Namespace : DevExpress.Spreadsheet

Assembly : DevExpress.Spreadsheet.v25.2.Core.dll

NuGet Package : DevExpress.Spreadsheet.Core

Declaration

csharp
void Hide(
    Style style
)
vb
Sub Hide(
    style As Style
)

Parameters

NameTypeDescription
styleStyle

A Style object that is a cell style to be hidden in the collection.

|

Remarks

A hidden style object is not deleted from the workbook’s collection of styles, but this style can no longer be applied to cells. If there are cells formatted with a style that you then hide, the Normal style (StyleCollection.DefaultStyle) will be automatically applied to that cells. If you try to apply a hidden style to cells in code, an exception occurs.

A hidden style object can be accessed and modified in code. To restore a hidden style in the collection, use the StyleCollection.Unhide method.

For more information on how to work with cell styles, refer to the How to: Apply a Style to a Cell or Range of Cells and How to: Create or Modify a Style examples.

See Also

Unhide(Style)

StyleCollection Interface

StyleCollection Members

DevExpress.Spreadsheet Namespace