Skip to main content

ToolbarItemRenderStyleMode Enum

Lists the Toolbar item’s render style modes.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v22.1.dll

Declaration

public enum ToolbarItemRenderStyleMode

Members

Name Description
Auto

Applies the DxToolbar.ItemRenderStyleMode property value to the item.

Contained

The item is always filled with color and has all borders.

Plain

The item is filled with color on hover or click and does not have borders between items.

Related API Members

The following properties accept/return ToolbarItemRenderStyleMode values:

Remarks

The ToolbarItemRenderStyleMode enumeration values specify how the Toolbar component renders its items. Note that the DxToolbarItem.RenderStyleMode property overrides the DxToolbar.ItemRenderStyleMode property value.

Auto Mode

When the style mode is set to Auto, items’ render style is specified by the DxToolbar.ItemRenderStyleMode property:

<DxToolbar ItemRenderStyleMode="ToolbarRenderStyleMode.Contained">
    @* The Info item's render style is Contained *@
    <DxToolbarItem Text="Info" 
                   RenderStyle="ButtonRenderStyle.Info" 
                   RenderStyleMode="ToolbarItemRenderStyleMode.Auto" />
</DxToolbar>

Contained Mode

In this mode, an item is filled with the color specified by the RenderStyle property and has borders:

<div class="card w-75 p-2">
    <DxToolbar>
        <DxToolbarItem Text="Info"
                       RenderStyle="ButtonRenderStyle.Info"
                       RenderStyleMode="ToolbarItemRenderStyleMode.Contained" />
        <DxToolbarItem Text="Success"
                       RenderStyle="ButtonRenderStyle.Success"
                       RenderStyleMode="ToolbarItemRenderStyleMode.Contained" />
    </DxToolbar>
</div>

Toolbar Item Render Style

Plain Mode

In this mode, an item is filled with the toolbar’s background color but does not have borders between two items. The color specified by the RenderStyle property is applied on hover or click:

<div class="card w-75 p-2">
    <DxToolbar>
        <DxToolbarItem Text="Info"
                       RenderStyle="ButtonRenderStyle.Info"
                       RenderStyleMode="ToolbarItemRenderStyleMode.Plain" />
        <DxToolbarItem Text="Success"
                       RenderStyle="ButtonRenderStyle.Success"
                       RenderStyleMode="ToolbarItemRenderStyleMode.Contained" />
    </DxToolbar>
</div>

Toolbar Item Render Style

Run Demo: Toolbar - Render Style

See Also