DxRichEdit.LostFocus Event

Fires after the Rich Text Editor loses focus.

Namespace: DevExpress.Blazor.RichEdit

Assembly: DevExpress.Blazor.RichEdit.v21.1.dll

Declaration

[Parameter]
public EventCallback LostFocus { get; set; }

Remarks

The example below demonstrates how to handle the GotFocus and LostFocus events:

<DxRichEdit Id="myRich" @ref="richEdit" LostFocus="@onLostFocus" GotFocus="@onGotFocus" />
@code {
    DxRichEdit richEdit { get; set; }

    async Task onLostFocus() {
    /* Surround the code that contains an asynchronous operation with a try-catch block to handle
    the OperationCanceledException. This exception is thrown when an asynchronous operation is cancelled. */
        try {
            // Your code
        }
        catch (OperationCanceledException e) {
            Console.WriteLine($"{nameof(OperationCanceledException)} thrown with message: {e.Message}");
        }
    }
    async Task onGotFocus() {
        try {
            // Your code
        }
        catch (OperationCanceledException e) {
            Console.WriteLine($"{nameof(OperationCanceledException)} thrown with message: {e.Message}");
        }
    }
}
See Also