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

IBarItem.TextDisplayMode Property

Specifies display mode for item text.

Namespace: DevExpress.Blazor.Office

Assembly: DevExpress.Blazor.v24.2.dll

NuGet Package: DevExpress.Blazor

#Declaration

C#
TextDisplayMode TextDisplayMode { get; set; }

#Property Value

Type Description
TextDisplayMode

The display mode.

Available values:

Name Description
None

The item text is hidden.

Adaptive

The item text is hidden by default, but displayed on mobile devices or when the item group is collapsed.

Auto

The item text is displayed by default, but hidden if there is not enough space to display all the bar items.

#Remarks

The following code snippet customizes the Rich Text Editor’s toolbar as follows:

  • Clears all groups.
  • Creates a custom Undo/Redo group.
  • Specifies the Adaptive text display mode for the Undo and Redo buttons.
Razor
<DxRichEdit BarMode=BarMode.Toolbar
            CustomizeToolbar=OnCustomizeToolbar/>

@code {
    void OnCustomizeToolbar(IToolbar toolbar) {
        BarGroupCollection groups = toolbar.Groups;
        groups.Clear();
        AddUndoRedoGroup(groups);
        // ...
    }
    void AddUndoRedoGroup(BarGroupCollection groups) {
        IBarGroup undoRedoGroup = groups.AddCustomGroup();
        undoRedoGroup.Text = "Undo/Redo";
        undoRedoGroup.IconUrl = "_content/BlazorDemo/images/undo.svg";
        IBarItem undoButton = undoRedoGroup.Items.Add(RichEditBarItemNames.Undo);
        undoButton.TextDisplayMode = TextDisplayMode.Adaptive;
        IBarItem redoButton = undoRedoGroup.Items.Add(RichEditBarItemNames.Redo);
        redoButton.TextDisplayMode = TextDisplayMode.Adaptive;
    }
}

Run Demo: Toolbar Customization

See Also