# TXSheetControl.Style Property

> TXSheetControl.Style property in the TX Sheet Control .NET API: Additional host CSS declarations; the editor's own styles remain in Shadow DOM.

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

---

Additional host CSS declarations. Editor styles remain in Shadow DOM.

### Syntax

```csharp
public string? Style { get; set; }
```

### Property Value

`string?`. Additional host CSS declarations. Editor styles remain in Shadow DOM.

### Examples

```cshtml
@using TXTextControl.TXSheetControl.Blazor
@using TXTextControl.TXSheetControl.Server
@inject Microsoft.Extensions.Configuration.IConfiguration Configuration
<TXSheetControl Options="options" Ready="OnReady" Error="OnError" Height="640" Class="sheet-editor" Style="width:100%" @ref="component"
    Changed="OnNotification" Edited="OnNotification" Loaded="OnNotification"
    Saved="OnNotification" Event="OnNotification" SelectionChanged="OnSelection" />
<p role="status">@status</p>
@code {
    private TXSheetControl? component;
    private void OnNotification(WorkbookEventArgs args) { status = "Workbook updated"; }
    private void OnSelection(SelectionChangedEventArgs args) { status = $"{args.Active} on {args.SheetId}"; }
    private SheetControlOptions options = default!;
    private string status = "Initializing";
    protected override void OnInitialized() => options = new()
    { License = Configuration["TXSheetControl:License"] ?? "", Rows = 2000, Columns = 20 };
    private async Task OnReady(BlazorSheetControl control)
    {
        var sheet = await control.Workbook.Sheets.AtAsync(0);
        await sheet.Range("A1:D2").SetValuesAsync([
            ["Item", "Quantity", "Price", "Total"], ["Notebook", 5, 12, null]
        ]);
        await sheet.Cell("D2").SetFormulaAsync("=B2*C2");
        await sheet.Range("A1:D1").FormatAsync(new { font = new { bold = true } });
        status = $"Ready ({(await control.GetLicenseInfoAsync()).Type})";
    }
    private void OnError(SheetControlErrorEventArgs error) =>
        status = $"{error.Code}: {error.Message}";
}
```

### Remarks

Await asynchronous operations. Replacement workbook loads invalidate earlier worksheet, cell and range handles. Browser callbacks report completed notifications.

### See Also

- [TXSheetControl](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-blazor/txsheetcontrol/llms-full.txt).

---

## Nearby

- **Previous:** [TXSheetControl.SelectionChanged Property](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-blazor/txsheetcontrol/selectionchanged-property/llms-full.txt)
- **Next:** [JavaScript API](https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/llms-full.txt)
