Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

BarItemExceptionEventArgs.Exception Property

Returns an exception that details the cause of the failure.

Namespace: DevExpress.Blazor.Office

Assembly: DevExpress.Blazor.v24.2.dll

NuGet Package: DevExpress.Blazor

#Declaration

C#
public Exception Exception { get; }

#Property Value

Type Description
Exception

A thrown exception.

#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 Customization Run Demo: Ribbon Customization

See Also