.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+

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.v20.2.Core.dll


void Hide(
    Style style
Sub Hide(
    style As Style


Name Type Description
style Style

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


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