# RadzenSpreadsheetFormatToggleToolBase Class

Base class for toggle-style format toolbar buttons (Bold, Italic, Underline, Strikethrough, TextWrap). Subclasses only need to override Format) and Boolean).

Namespace: [Radzen.Blazor](https://blazor.radzen.com/docs/api/Radzen.Blazor.md)

Assembly: Radzen.Blazor.dll

## Inheritance

- Object
- ComponentBase
- RadzenSpreadsheetFormatToggleToolBase

Derived types: [RadzenSpreadsheetBold](https://blazor.radzen.com/docs/api/Radzen.Blazor.RadzenSpreadsheetBold.md), [RadzenSpreadsheetItalic](https://blazor.radzen.com/docs/api/Radzen.Blazor.RadzenSpreadsheetItalic.md), [RadzenSpreadsheetStrikethrough](https://blazor.radzen.com/docs/api/Radzen.Blazor.RadzenSpreadsheetStrikethrough.md), [RadzenSpreadsheetTextWrap](https://blazor.radzen.com/docs/api/Radzen.Blazor.RadzenSpreadsheetTextWrap.md), [RadzenSpreadsheetUnderline](https://blazor.radzen.com/docs/api/Radzen.Blazor.RadzenSpreadsheetUnderline.md)

## Implements

- IComponent
- IHandleEvent
- IHandleAfterRender

## Syntax

```csharp
public abstract class RadzenSpreadsheetFormatToggleToolBase : ComponentBase, IComponent, IHandleEvent, IHandleAfterRender
```

## Constructors

| Constructor | Description |
|-------------|-------------|
| `protected RadzenSpreadsheetFormatToggleToolBase()` | Initializes a new instance of the [RadzenSpreadsheetFormatToggleToolBase](https://blazor.radzen.com/docs/api/Radzen.Blazor.RadzenSpreadsheetFormatToggleToolBase.md) class. |

## Properties

| Property | Type | Description |
|------|------|-------------|
| IsDisabled | `bool` | Gets whether the tool should be disabled. |
| IsToggled | `bool` | Derived state: whether the selected cell's format has this property toggled on. |
| Spreadsheet | [`ISpreadsheet`](https://blazor.radzen.com/docs/api/Radzen.Blazor.ISpreadsheet.md) | The host spreadsheet, cascaded from [RadzenSpreadsheet](https://blazor.radzen.com/docs/api/Radzen.Blazor.RadzenSpreadsheet.md). |
| Worksheet | [`Documents.Spreadsheet.Worksheet`](https://blazor.radzen.com/docs/api/Radzen.Documents.Spreadsheet.Worksheet.md) | The active worksheet, cascaded from the host [RadzenSpreadsheet](https://blazor.radzen.com/docs/api/Radzen.Blazor.RadzenSpreadsheet.md). |

## Methods

| Method | Returns | Description |
|------|---------|-------------|
| `GetValue(Documents.Spreadsheet.Format format)` | `bool` | Reads the boolean property from the cell's format (e.g. format.Bold). |
| `OnParametersSet()` | `void` |  |
| `OnToggledChangedAsync(bool value)` | `Task` | Dispatches a [FormatCommand](https://blazor.radzen.com/docs/api/Radzen.Blazor.Spreadsheet.FormatCommand.md) to set the toggle to value. Used as the ValueChanged callback for the underlying toggle button. |
| `WithValue(Documents.Spreadsheet.Format format, bool value)` | [`Documents.Spreadsheet.Format`](https://blazor.radzen.com/docs/api/Radzen.Documents.Spreadsheet.Format.md) | Returns a new format with the boolean property set (e.g. format.WithBold(value)). |

## Inherited Members

- From ComponentBase: Assets, AssignedRenderMode, BuildRenderTree, DispatchExceptionAsync, InvokeAsync, OnAfterRender, OnAfterRenderAsync, OnInitialized, OnInitializedAsync, OnParametersSetAsync, RendererInfo, SetParametersAsync, ShouldRender, StateHasChanged

