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 to this section

Initializes a new instance of the RadzenSpreadsheetFormatToggleToolBase class.

Declaration
protected RadzenSpreadsheetFormatToggleToolBase()

Properties

IsDisabledLink to this section

Gets whether the tool should be disabled.

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

IsToggledLink to this section

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 to this section

The host spreadsheet, cascaded from RadzenSpreadsheet.

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

WorksheetLink to this section

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 to this section

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 to this section

Declaration
protected override void OnParametersSet()

OnToggledChangedAsyncLink to this section

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 to this section

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 🗙