RadzenSignaturePad Class

A signature pad component that allows users to draw a signature using mouse, touch, or pen input. The signature is captured as a base64-encoded PNG data URL. Supports data binding, validation, and form integration.

Inheritance

Object

ComponentBase

RadzenComponent

FormComponent<string>

RadzenSignaturePad

Implements

IComponent

IHandleEvent

IHandleAfterRender

IRadzenFormComponent

Inherited Members

FormComponent<string>.GetValue

FormComponent<string>.OnContextMenu

FormComponent<string>.GetClassList

FormComponent<string>.FocusAsync

FormComponent<string>.Name

FormComponent<string>.TabIndex

FormComponent<string>.Placeholder

FormComponent<string>.Disabled

FormComponent<string>.EditContext

FormComponent<string>.Form

FormComponent<string>.ValueChanged

FormComponent<string>.HasValue

FormComponent<string>.IsBound

FormComponent<string>.Value

FormComponent<string>.Change

FormComponent<string>.FieldIdentifier

FormComponent<string>.ValueExpression

FormComponent<string>.FormFieldContext

FormComponent<string>.CurrentPlaceholder

FormComponent<string>._value

RadzenComponent.OnMouseEnter

RadzenComponent.OnMouseLeave

RadzenComponent.GetCssClass

RadzenComponent.GetId

RadzenComponent.Debounce

RadzenComponent.Localize

RadzenComponent.OnInitialized

RadzenComponent.RaiseContextMenu

RadzenComponent.RaiseMouseEnter

RadzenComponent.AddContextMenu

RadzenComponent.RaiseMouseLeave

RadzenComponent.OnBecameInvisible

RadzenComponent.Attributes

RadzenComponent.Element

RadzenComponent.MouseEnter

RadzenComponent.MouseLeave

RadzenComponent.ContextMenu

RadzenComponent.Culture

RadzenComponent.DefaultCulture

RadzenComponent.UICulture

RadzenComponent.DefaultUICulture

RadzenComponent.Style

RadzenComponent.Visible

RadzenComponent.UniqueID

RadzenComponent.JSRuntime

RadzenComponent.IsJSRuntimeAvailable

RadzenComponent.Reference

RadzenComponent.CurrentStyle

ComponentBase.OnInitializedAsync

ComponentBase.OnParametersSet

ComponentBase.OnParametersSetAsync

ComponentBase.StateHasChanged

ComponentBase.ShouldRender

ComponentBase.OnAfterRender

ComponentBase.InvokeAsync

ComponentBase.DispatchExceptionAsync

ComponentBase.RendererInfo

ComponentBase.Assets

ComponentBase.AssignedRenderMode

Namespace: Radzen.Blazor

Assembly: Radzen.Blazor.dll

Syntax

public class RadzenSignaturePad : FormComponent<string>, IComponent, IHandleEvent, IHandleAfterRender, IRadzenFormComponent

Examples

Basic usage with two-way binding:

<RadzenSignaturePad @bind-Value=@signature />

With custom size and stroke:

<RadzenSignaturePad @bind-Value=@signature Style="width: 500px; height: 200px;" StrokeColor="#000" StrokeWidth="2" />

Constructors

RadzenSignaturePadlink

A signature pad component that allows users to draw a signature using mouse, touch, or pen input. The signature is captured as a base64-encoded PNG data URL. Supports data binding, validation, and form integration.

Declaration
public RadzenSignaturePad()

Properties

AllowClearlink

Gets or sets a value indicating whether the user can clear the signature. Set to true by default.

Declaration
public bool AllowClear { get; set; }
Property Value
Type Description
boolGets or sets a value indicating whether the user can clear the signature. Set to true by default.

ClearAriaLabellink

Gets or sets the accessible label text for the clear button.

Declaration
public string ClearAriaLabel { get; set; }
Property Value
Type Description
stringGets or sets the accessible label text for the clear button.

ReadOnlylink

Gets or sets whether the signature pad is read-only.

Declaration
public bool ReadOnly { get; set; }
Property Value
Type Description
boolGets or sets whether the signature pad is read-only.

StrokeColorlink

Gets or sets the stroke color used for drawing.

Declaration
public string StrokeColor { get; set; }
Property Value
Type Description
stringGets or sets the stroke color used for drawing.

StrokeWidthlink

Gets or sets the width of the stroke in pixels.

Declaration
public double StrokeWidth { get; set; }
Property Value
Type Description
doubleGets or sets the width of the stroke in pixels.

Methods

BuildRenderTreelink

Declaration
protected override void BuildRenderTree(Rendering.RenderTreeBuilder __builder)
Parameters
Type Name Description
Rendering.RenderTreeBuilder __builder

Clearlink

Clears the signature pad.

Declaration
public Task Clear()
Returns
Type Description
Task

Disposelink

Declaration
public override void Dispose()

GetComponentCssClasslink

Declaration
protected override string GetComponentCssClass()
Returns
Type Description
string

OnAfterRenderAsynclink

Declaration
protected override Task OnAfterRenderAsync(bool firstRender)
Parameters
Type Name Description
bool firstRender
Returns
Type Description
Task

OnStrokeEndlink

Called from JavaScript when the user finishes drawing a stroke.

Declaration
public Task OnStrokeEnd(string dataUrl)
Parameters
Type Name Description
string dataUrl The base64-encoded PNG data URL of the signature.
Returns
Type Description
Task

SetParametersAsynclink

Declaration
public override Task SetParametersAsync(ParameterView parameters)
Parameters
Type Name Description
ParameterView parameters
Returns
Type Description
Task
An error has occurred. This app may no longer respond until reloaded. Reload 🗙