Skip to main content

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

SpreadsheetClipboardOptions.KeepThemeColors Property

Gets or sets whether to keep theme colors of the SpreadsheetControl’s document when its data is copied to an external spreadsheet application. This is a dependency property.

Namespace: DevExpress.Xpf.Spreadsheet

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

NuGet Package: DevExpress.Wpf.Spreadsheet

#Declaration

public bool KeepThemeColors { get; set; }

#Property Value

Type Description
Boolean

true, to keep the document’s theme colors; otherwise, false.

#Property Paths

You can access this nested property as listed below:

Object Type Path to KeepThemeColors
SpreadsheetControlOptions
.Clipboard .KeepThemeColors

#Remarks

If you copy data from the SpreadsheetControl to an external spreadsheet application (another SpreadsheetControl instance or Microsoft® Excel®), theme formatting can change for the copied data to use the destination workbook’s theme colors and fonts.

Spreadsheet_KeepTheme_False

To preserve theme formatting for copied data, set the control’s KeepThemeColors and KeepThemeFonts properties to true. In this case, theme colors are converted to the corresponding custom RGB colors, and theme fonts become user-defined fonts with the font scheme None.

Spreadsheet_KeepTheme_True

If you programmatically copy data between workbooks with different themes applied, you can use the following properties to preserve the source workbook’s theme colors and fonts:

See Also