Spread WPF 15
GrapeCity.Windows.SpreadSheet.UI Namespace / GcSpreadSheet Class / CurrentThemeName Property
Example


In This Topic
    CurrentThemeName Property (GcSpreadSheet)
    In This Topic
    Gets or sets the current theme information for the control.
    Syntax
    'Declaration
     
    <CategoryAttribute("Spread Workbook")>
    <DefaultValueAttribute("Office")>
    Public Property CurrentThemeName As String
    'Usage
     
    Dim instance As GcSpreadSheet
    Dim value As String
     
    instance.CurrentThemeName = value
     
    value = instance.CurrentThemeName
    [Category("Spread Workbook")]
    [DefaultValue("Office")]
    public string CurrentThemeName {get; set;}
    Example
    This example sets the CurrentThemeName property.
    SpreadTheme customTheme = new SpreadTheme("customTheme1");
    customTheme.Colors.Accent1 = Colors.Red;
    customTheme.Colors.Accent2 = Colors.Green;
    gcSpreadSheet1.Themes.Add(customTheme);
    gcSpreadSheet1.CurrentThemeName = "customTheme1";
    gcSpreadSheet1.Sheets[0].Cells[1, 1].BackgroundThemeColor = "Accent 1 50";
    Dim customTheme As New SpreadTheme("customTheme1")
    customTheme.Colors.Accent1 = Colors.Red
    customTheme.Colors.Accent2 = Colors.Green
    GcSpreadSheet1.Themes.Add(customTheme)
    GcSpreadSheet1.CurrentThemeName = "customTheme1"
    GcSpreadSheet1.Sheets(0).Cells(1, 1).BackgroundThemeColor = "Accent 1 50"
    See Also