# TableDefinition.CustomStyle Property

> TableDefinition.CustomStyle property in the TX Sheet Control .NET API, with its type System.Text.Json.JsonElement? and a C# example.

- **Product:** TX Sheet Control
- **Section:** Documentation
- **Kind:** Property
- **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 > TableDefinition > TableDefinition.CustomStyle Property
- **402 words**
- **Web URL:** https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/tabledefinition/customstyle-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/tabledefinition/customstyle-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/tabledefinition/customstyle-property/llms-full.txt

---

Named custom table recipe containing `name` and `elements`. Each element supplies `type`, optional stripe `size` and sparse `formatting`. The recipe applies while its name matches `Style`; omitted recipes use built-in styles.

### Syntax

```csharp
public System.Text.Json.JsonElement? CustomStyle { get; init; }
```

A named sparse table recipe. It applies while its name matches style. Direct formatting overrides table formatting; conditional rules have highest priority. See [Tables](https://docs.textcontrol.com/tx-sheet-control/spreadsheets/tables/llms-full.txt) for recipe roles and precedence. Validation errors reject the asynchronous operation without changing the table.

### Example

```csharp
using TXTextControl.TXSheetControl.Server;

async Task CopyBudgetStyle(Table source, Table target, CancellationToken cancellationToken)
{
    TableDefinition snapshot = await source.GetSnapshotAsync(cancellationToken);
    await target.UpdateAsync(new TableOptions {
        Style = snapshot.Style, CustomStyle = snapshot.CustomStyle
    }, cancellationToken);
}
```

---

## Nearby

- **Previous:** [TableDefinition.Style Property](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/tabledefinition/style-property/llms-full.txt)
- **Next:** [TableOptions Class](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/tableoptions/llms-full.txt)
