private void GettingActualValueFromThemableColor(DocumentTheme theme, ThemableColor themableColor) { #region radwordsprocessing-concepts-document-themes_7 Color actualColor = themableColor.GetActualValue(theme); // the actual color is the same as Accent1 color of the colorScheme #endregion }
private void ChangingDocumentTheme(DocumentTheme theme) { #region radwordsprocessing-concepts-document-themes_6 RadFlowDocument document = new RadFlowDocument(); document.Theme = theme; #endregion }
/// <summary> /// Converts CellBorder to BorderStyle /// </summary> /// <param name="border">The document border style</param> /// <param name="theme">Document theme</param> /// <returns>Converted BorderStyle instances</returns> public static BorderStyle ToBorderStyle(this CellBorder border, DocumentTheme theme) { return new BorderStyle { Color = border.Color.GetActualValue(theme).ToHex(), Size = border.Thickness.ToPixels() }; }
private void GettingActualValueFromThemableFont(DocumentTheme theme, ThemableFontFamily themableFont) { #region radwordsprocessing-concepts-document-themes_8 var actualFont = themableFont.GetActualValue(theme); // the actualFont is the same as the Major font of the fontScheme #endregion }
public void Demo() { #region radspreadsheet-model-features-styling-document-themes_0 ThemeColorScheme colorScheme = new ThemeColorScheme( "Mine", Colors.Black, // background 1 Colors.Blue, // text 1 Colors.Brown, // background 2 Colors.Cyan, // text 2 Colors.DarkGray, // accent 1 Colors.Gray, // accent 2 Colors.Green, // accent 3 Colors.LightGray, // accent 4 Colors.Magenta, // accent 5 Colors.Orange, // accent 6 Colors.Purple, // hyperlink Colors.Red); // followedHyperlink #endregion #region radspreadsheet-model-features-styling-document-themes_1 ThemableColor themableColor = new ThemableColor(ThemeColorType.Accent1); #endregion #region radspreadsheet-model-features-styling-document-themes_2 ThemeFontScheme fontScheme = new ThemeFontScheme( "Mine", "Times New Roman", // latinMajor "Arial"); // latinMinor #endregion #region radspreadsheet-model-features-styling-document-themes_3 ThemableFontFamily themableFont = new ThemableFontFamily(ThemeFontType.Major); #endregion #region radspreadsheet-model-features-styling-document-themes_4 DocumentTheme theme = new DocumentTheme("Mine", colorScheme, fontScheme); #endregion #region radspreadsheet-model-features-styling-document-themes_5 DocumentTheme theme1 = new DocumentTheme("From Predefined schemes", PredefinedThemeSchemes.ColorSchemes[0], PredefinedThemeSchemes.FontSchemes[5]); #endregion #region radspreadsheet-model-features-styling-document-themes_6 Workbook workbook = new Workbook(); workbook.Worksheets.Add(); workbook.Theme = theme; #endregion #region radspreadsheet-model-features-styling-document-themes_7 Color actualColor = themableColor.GetActualValue(theme); // the actual color is the same as Accent1 color of the colorScheme #endregion #region radspreadsheet-model-features-styling-document-themes_8 var actualFont = themableFont.GetActualValue(theme); // the actualFont is the same as the Major font of the fontScheme #endregion }
private void SetWorkbookTheme() { ThemeColorScheme colorScheme = new ThemeColorScheme("ExpenseReport", Color.FromArgb(255, 65, 65, 65), // Background1 Color.FromArgb(255, 240, 240, 240), // Text1 Color.FromArgb(255, 0, 0, 0), // Background2 Color.FromArgb(255, 255, 255, 255), // Text2 Color.FromArgb(255, 116, 202, 218), // Accent1 Color.FromArgb(255, 146, 204, 70), // Accent2 Color.FromArgb(255, 241, 96, 61), // Accent3 Color.FromArgb(255, 143, 145, 158), // Accent4 Color.FromArgb(255, 141, 119, 251), // Accent5 Color.FromArgb(255, 91, 119, 153), // Accent6 Color.FromArgb(255, 5, 99, 193), // Hyperlink Color.FromArgb(255, 149, 79, 114)); // Followed hyperlink ThemeFontScheme fontScheme = new ThemeFontScheme("ExpenseReport", "Cambria", "Segoe UI"); DocumentTheme theme = new DocumentTheme("ExpenseReport", colorScheme, fontScheme); this.workbook.Theme = theme; }
public static void SetDocumentTheme(DependencyObject i, DocumentTheme v) => i.Set(DocumentThemeProperty, v);
public static void SetDocumentTheme(DependencyObject i, DocumentTheme v) => i.Set(DocumentThemeProperty, v);
private void CreateThemeFromPredefinedSchemes() { #region radspreadprocessing-features-styling-document-themes_5 DocumentTheme theme = new DocumentTheme("From predefined schemes", PredefinedThemeSchemes.ColorSchemes[0], PredefinedThemeSchemes.FontSchemes[5]); #endregion }
private void SetWorkbookTheme() { ThemeColorScheme colorScheme = new ThemeColorScheme("ExpenseReport", Color.FromArgb(255, 65, 65, 65), // Background1 Color.FromArgb(255, 240, 240, 240), // Text1 Color.FromArgb(255, 0, 0, 0), // Background2 Color.FromArgb(255, 255, 255, 255), // Text2 Color.FromArgb(255, 116, 202, 218), // Accent1 Color.FromArgb(255, 146, 204, 70), // Accent2 Color.FromArgb(255, 241, 96, 61), // Accent3 Color.FromArgb(255, 143, 145, 158), // Accent4 Color.FromArgb(255, 141, 119, 251), // Accent5 Color.FromArgb(255, 91, 119, 153), // Accent6 Color.FromArgb(255, 5, 99, 193), // Hyperlink Color.FromArgb(255, 149, 79, 114)); // Followed hyperlink ThemeFontScheme fontScheme = new ThemeFontScheme("ExpenseReport", "Cambria", "Segoe UI"); DocumentTheme theme = new DocumentTheme("ExpenseReport", colorScheme, fontScheme); this.workbook.Theme = theme; }
private void CreatingThemeFromPredefinedColorandFontSchemes() { #region radwordsprocessing-concepts-document-themes_5 DocumentTheme theme1 = new DocumentTheme("From Predefined schemes", PredefinedThemeSchemes.ColorSchemes[0], PredefinedThemeSchemes.FontSchemes[5]); #endregion }
private void CreatingTheme(ThemeColorScheme colorScheme, ThemeFontScheme fontScheme) { #region radwordsprocessing-concepts-document-themes_4 DocumentTheme theme = new DocumentTheme("Mine", colorScheme, fontScheme); #endregion }