RadzenSpreadsheetFormatToggleToolBase Class

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

Implements

IComponent

IHandleEvent

IHandleAfterRender

Inherited Members

ComponentBase.BuildRenderTree

ComponentBase.OnInitialized

ComponentBase.OnInitializedAsync

ComponentBase.OnParametersSetAsync

ComponentBase.StateHasChanged

ComponentBase.ShouldRender

ComponentBase.OnAfterRender

ComponentBase.OnAfterRenderAsync

ComponentBase.InvokeAsync

ComponentBase.DispatchExceptionAsync

ComponentBase.SetParametersAsync

ComponentBase.RendererInfo

ComponentBase.Assets

ComponentBase.AssignedRenderMode

Namespace: Radzen.Blazor

Assembly: Radzen.Blazor.dll

Syntax

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

Constructors

RadzenSpreadsheetFormatToggleToolBaselink

Initializes a new instance of the RadzenSpreadsheetFormatToggleToolBase class.

Declaration
protected RadzenSpreadsheetFormatToggleToolBase()

Properties

IsDisabledlink

Gets whether the tool should be disabled.

Declaration
protected bool IsDisabled { get; }
Property Value
Type Description
boolGets whether the tool should be disabled.

IsToggledlink

Derived state: whether the selected cell's format has this property toggled on.

Declaration
protected bool IsToggled { get; }
Property Value
Type Description
boolDerived state: whether the selected cell's format has this property toggled on.

Spreadsheetlink

The host spreadsheet, cascaded from RadzenSpreadsheet.

Declaration
public ISpreadsheet Spreadsheet { get; set; }
Property Value
Type Description
ISpreadsheetThe host spreadsheet, cascaded from RadzenSpreadsheet.

Worksheetlink

The active worksheet, cascaded from the host RadzenSpreadsheet.

Declaration
public Documents.Spreadsheet.Worksheet Worksheet { get; set; }
Property Value
Type Description
Documents.Spreadsheet.WorksheetThe active worksheet, cascaded from the host RadzenSpreadsheet.

Methods

GetValuelink

Reads the boolean property from the cell's format (e.g. format.Bold).

Declaration
protected abstract bool GetValue(Documents.Spreadsheet.Format format)
Parameters
Type Name Description
Documents.Spreadsheet.Format format
Returns
Type Description
bool

OnParametersSetlink

Declaration
protected override void OnParametersSet()

OnToggledChangedAsynclink

Dispatches a FormatCommand to set the toggle to value. Used as the ValueChanged callback for the underlying toggle button.

Declaration
protected Task OnToggledChangedAsync(bool value)
Parameters
Type Name Description
bool value
Returns
Type Description
Task

WithValuelink

Returns a new format with the boolean property set (e.g. format.WithBold(value)).

Declaration
protected abstract Documents.Spreadsheet.Format WithValue(Documents.Spreadsheet.Format format, bool value)
Parameters
Type Name Description
Documents.Spreadsheet.Format format
bool value
Returns
An error has occurred. This app may no longer respond until reloaded. Reload 🗙