Skip to main content
All docs
V24.2
Row

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

WorkbookColorPalette.Reset() Method

In This Article

Resets custom palette colors to default colors.

Namespace: DevExpress.Spreadsheet

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

NuGet Package: DevExpress.Spreadsheet.Core

#Declaration

void Reset()

#Remarks

The following example demonstrates how to reset custom colors in a workbook palette to default colors. Use the WorkbookColorPalette.IsCustom property to check whether the palette contains custom colors.

using DevExpress.Spreadsheet;
// ...
using (Workbook workbook = new Workbook())
{
    workbook.LoadDocument("Book1.xlsx");
    // ...
    if (workbook.ColorPalette.IsCustom)
        workbook.ColorPalette.Reset();
}
See Also