# DashboardTheme Class

> DashboardTheme class in the TX Sheet Control .NET API: Coordinated canvas and card defaults; explicit widget appearance always wins.

- **Product:** TX Sheet Control
- **Section:** Documentation
- **Kind:** Class
- **Namespace:** `TXTextControl.TXSheetControl.Server`
- **Package:** `TXTextControl.TXSheetControl.Server` (assembly `TXTextControl.TXSheetControl.Api.dll`, from the private NuGet feed or the supplied NuGet folder)
- **Package:** `TXTextControl.TXSheetControl.Blazor` (assembly `TXTextControl.TXSheetControl.Api.dll`, from the private NuGet feed or the supplied NuGet folder)
- **Path:** TX Sheet Control > API Reference > .NET API > TXTextControl.TXSheetControl.Server > DashboardTheme Class
- **2238 words**
- **Web URL:** https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/dashboardtheme/
- **LLMs URL:** https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/dashboardtheme/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/dashboardtheme/llms-full.txt

---

Coordinated canvas and card defaults; explicit widget appearance always wins.

### Members

| Property | Description |
|---|---|
| [Accent](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/dashboardtheme/accent-property/llms-full.txt) | Typed accent setting; validated by the owning dashboard operation. |
| [Background](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/dashboardtheme/background-property/llms-full.txt) | Typed background setting; validated by the owning dashboard operation. |
| [Gradient](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/dashboardtheme/gradient-property/llms-full.txt) | Typed gradient setting; validated by the owning dashboard operation. |
| [Surface](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/dashboardtheme/surface-property/llms-full.txt) | Typed surface setting; validated by the owning dashboard operation. |
| [TextColor](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/dashboardtheme/textcolor-property/llms-full.txt) | Typed text color setting; validated by the owning dashboard operation. |
| [BorderColor](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/dashboardtheme/bordercolor-property/llms-full.txt) | Typed border color setting; validated by the owning dashboard operation. |
| [PositiveColor](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/dashboardtheme/positivecolor-property/llms-full.txt) | Typed positive color setting; validated by the owning dashboard operation. |
| [NegativeColor](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/dashboardtheme/negativecolor-property/llms-full.txt) | Typed negative color setting; validated by the owning dashboard operation. |
| [FontFamily](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/dashboardtheme/fontfamily-property/llms-full.txt) | Typed font family setting; validated by the owning dashboard operation. |
| [WidgetDefaults](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/dashboardtheme/widgetdefaults-property/llms-full.txt) | Typed widget defaults setting; validated by the owning dashboard operation. |

### Constructor

```csharp
public DashboardTheme()
```

Creates an instance with the property defaults shown in this reference. Settings are validated when applied to the owning document; result objects obtained from document operations are detached snapshots.

### Examples

Create and configure a sales dashboard, then write the resulting SVG report.

```csharp
using System.Text.Json;
using TXTextControl.TXSheetControl.Server;

async Task ConfigureSalesDashboard(ServerSheetControl control)
{
    var book = control.Workbook;
    var sheet = await book.Sheets.AtAsync(0);
    await sheet.Range("A1:G5").SetValuesAsync(new object?[][] {
        ["Region", "Country", "Customer", "Revenue", "Profit", "Date", "Units"],
        ["Europe", "Germany", "Studio", 42000, 12000, "2026-01-15", 12],
        ["Europe", "France", "Labs", 38000, 9000, "2026-02-15", 15],
        ["Americas", "Canada", "Partners", 31000, 8000, "2026-01-15", 9],
        ["Americas", "United States", "Design", 49000, 15000, "2026-02-15", 18]
    });
    await book.Analytics.SetSourceAsync(new() { Id = "sales", Name = "Sales", SheetId = sheet.Id, Range = "A1:G5", HasHeaderRow = true });
    var dashboard = await book.Dashboards.AddAsync("Sales Performance");
    await dashboard.UpdateAsync(new { sections = new DashboardSection[] { new() { Id = "summary", Title = "Executive Summary" } } });
    await dashboard.AddWidgetAsync(new() {
        Id = "revenue", Type = "column", Title = "Regional Revenue",
        Placement = new() { X = 0, Y = 0, Width = 8, Height = 6 },
        Query = new() { SourceId = "sales", Dimensions = ["Region"], Measures = [
            new() { Field = "Revenue", Aggregation = "SUM", Alias = "Revenue" },
            new() { Field = "Profit", Aggregation = "SUM", Alias = "Profit" }
        ] }
    });
    var settings = JsonSerializer.Deserialize<DashboardTheme>(
        """
        {
            "accent": "#75B5FF",
            "background": "#102238",
            "gradient": {
                "type": "linear",
                "angle": 135,
                "stops": [
                    {
                        "offset": 0,
                        "color": "#12335A"
                    },
                    {
                        "offset": 1,
                        "color": "#376E9C"
                    }
                ]
            },
            "surface": "#17385A",
            "textColor": "#F2F6FF",
            "borderColor": "#496586",
            "positiveColor": "#70DDB8",
            "negativeColor": "#FF94A9",
            "fontFamily": "Noto Sans",
            "widgetDefaults": {
                "padding": 20,
                "borderRadius": 16,
                "shadow": {
                    "color": "#000000",
                    "opacity": 0.12,
                    "blur": 16,
                    "offsetX": 0,
                    "offsetY": 4
                }
            }
        }
        """, new JsonSerializerOptions(JsonSerializerDefaults.Web))!;
    await dashboard.UpdateAsync(new { theme = settings });
    await File.WriteAllTextAsync("sales-dashboard.svg", await dashboard.RenderSvgAsync());
}
```

---

## In This Section

- [DashboardTheme.Accent Property](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/dashboardtheme/accent-property/llms-full.txt): DashboardTheme.Accent property in the .NET API: Typed accent setting of the coordinated canvas and card defaults; explicit widget appearance always wins.
- [DashboardTheme.Background Property](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/dashboardtheme/background-property/llms-full.txt): DashboardTheme.Background property in the TX Sheet Control .NET API, with its syntax, its type string? and a C# example.
- [DashboardTheme.BorderColor Property](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/dashboardtheme/bordercolor-property/llms-full.txt): DashboardTheme.BorderColor property in the TX Sheet Control .NET API, with its syntax, its type string? and a C# example.
- [DashboardTheme.FontFamily Property](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/dashboardtheme/fontfamily-property/llms-full.txt): DashboardTheme.FontFamily property in the TX Sheet Control .NET API, with its syntax, its type string? and a C# example.
- [DashboardTheme.Gradient Property](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/dashboardtheme/gradient-property/llms-full.txt): DashboardTheme.Gradient property in the TX Sheet Control .NET API, with its syntax, its type DashboardGradient? and a C# example.
- [DashboardTheme.NegativeColor Property](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/dashboardtheme/negativecolor-property/llms-full.txt): DashboardTheme.NegativeColor property in the TX Sheet Control .NET API, with its syntax, its type string? and a C# example.
- [DashboardTheme.PositiveColor Property](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/dashboardtheme/positivecolor-property/llms-full.txt): DashboardTheme.PositiveColor property in the TX Sheet Control .NET API, with its syntax, its type string? and a C# example.
- [DashboardTheme.Surface Property](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/dashboardtheme/surface-property/llms-full.txt): DashboardTheme.Surface property in the TX Sheet Control .NET API: Typed surface setting; validated by the owning dashboard operation.
- [DashboardTheme.TextColor Property](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/dashboardtheme/textcolor-property/llms-full.txt): DashboardTheme.TextColor property in the TX Sheet Control .NET API: Typed text color setting; validated by the owning dashboard operation.
- [DashboardTheme.WidgetDefaults Property](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/dashboardtheme/widgetdefaults-property/llms-full.txt): DashboardTheme.WidgetDefaults property in the TX Sheet Control .NET API, with its type DashboardWidgetAppearance? and a C# example.

---

## Nearby

- **Previous:** [DashboardShadow.OffsetY Property](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/dashboardshadow/offsety-property/llms-full.txt)
- **Next:** [DashboardTheme.Accent Property](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/dashboardtheme/accent-property/llms-full.txt)
