Skip to main content
A newer version of this page is available. .

DxRichEdit.BarItemExceptionRaised Event

Allows you to handle exceptions that occur after a user interacts with an item in the menu bar.

Namespace: DevExpress.Blazor.RichEdit

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

NuGet Package: DevExpress.Blazor.RichEdit

Declaration

[Parameter]
public EventCallback<BarItemExceptionEventArgs> BarItemExceptionRaised { get; set; }

Event Data

The BarItemExceptionRaised event's data class is BarItemExceptionEventArgs. The following properties provide information specific to this event:

Property Description
Exception Returns an exception that details the cause of the failure.
Handled Gets or sets a value that indicates whether the event handler has completely handled the event or whether the system should continue its own processing. Inherited from HandledEventArgs.

Remarks

The Rich Text Editor runs asynchronous code to respond to user actions. Use the BarItemExceptionRaised event to handle runtime exceptions that occur after a user interacts with a build-in or custom item in the menu bar.

The example below demonstrates how to write log messages for exeptions that occur after a user interacts with a custom ribbon:

@inject ILogger<RibbonCustomization> Logger;
@using Microsoft.Extensions.Logging;

<DxRichEdit CustomizeRibbon=OnCustomizeRibbon />

@code {
    void OnCustomizeRibbon(IRibbon ribbon) {
        // ...
    }
    void OnBarItemExceptionRaised(BarItemExceptionEventArgs args) {
        Logger.LogError(args.Exception, args.Exception.Message);
        args.Handled = true;
    }
}
See Also