public Color?GetDefaultBackgroundColor() { StyleInfo defaultStyle = this.sheet.DefaultStyle; if ((this.sheet != null) && (defaultStyle != null)) { if ((this.sheet.Workbook != null) && defaultStyle.IsBackgroundThemeColorSet()) { return(new Color?(this.sheet.Workbook.GetThemeColor(defaultStyle.BackgroundThemeColor))); } if (defaultStyle.Background is SolidColorBrush) { return(new Color?(((SolidColorBrush)defaultStyle.Background).Color)); } } return(null); }