New toTelerik UI for Blazor?Download free 30-day trial

Events

This article describes the Blazor Signature events and provides a runnable example with sample event handler implementations.

OnBlur

TheOnBlurevent fires when the Signature loses focus.

OnChange

TheOnChangeevent represents a user action - confirmation of the current value. It fires when the user pressesEnter, or when the component loses focus.

TheOnChangeevent is a custom event and does not interfere with bindings, so you can use it together with models and forms.

ValueChanged

TheValueChangedevent fires when signature is fully drawn.

Example

Handle the Blazor Signature Events

Last event: @EventLog

@code { private string SignatureValue { get; set; } private string EventLog { get; set; } = "..."; private void ValueChangedHandler(string value) { SignatureValue = value; EventLog = $"ValueChanged event fired at {DateTime.Now.ToLongTimeString()}"; } private void OnSignatureBlur() { EventLog = $"OnBlur event fired"; } private void OnSignatureChange(string value) { EventLog = $"OnChange event fired"; } }

See Also

In this article
Baidu
map