Back to Devexpress

BarItemExceptionEventArgs Class

blazor-devexpress-dot-blazor-dot-office-e4591c80.md

latest2.0 KB
Original Source

BarItemExceptionEventArgs Class

Contains data for the BarItemExceptionRaised event.

Namespace : DevExpress.Blazor.Office

Assembly : DevExpress.Blazor.v25.2.dll

NuGet Package : DevExpress.Blazor

Declaration

csharp
public class BarItemExceptionEventArgs :
    HandledEventArgs

BarItemExceptionEventArgs is the data class for the following events:

Remarks

The following code snippet handles exceptions that may occur when a user interacts with an item on the Rich Text Editor’s ribbon or toolbar.

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

<DxRichEdit CustomizeToolbar=OnCustomizeToolbar
            BarItemExceptionRaised=OnBarItemExceptionRaised />

@code {
    void OnCustomizeToolbar(IToolbar toolbar) {
        // ...
    }

    void OnBarItemExceptionRaised(BarItemExceptionEventArgs args) {
        Logger.LogError(args.Exception, args.Exception.Message);
        args.Handled = true;
    }
}

Run Demo: Toolbar CustomizationRun Demo: Ribbon Customization

Inheritance

Object EventArgs HandledEventArgs BarItemExceptionEventArgs

See Also

BarItemExceptionEventArgs Members

DevExpress.Blazor.Office Namespace