DxMenu.ItemTextTemplate Property
Specifies the text template for menu items.
Namespace: DevExpress.Blazor
Assembly: DevExpress.Blazor.v24.2.dll
NuGet Package: DevExpress.Blazor
#Declaration
[Parameter]
public RenderFragment<IMenuItemInfo> ItemTextTemplate { get; set; }
#Property Value
Type | Description |
---|---|
Render |
The template content. |
#Remarks
The Menu component allows you to use templates to customize the layout and appearance of menu items and their parts.
Use the ItemTextTemplate
to specify a common text template for all menu items.
<div class="card w-auto">
<DxMenu>
<ItemTextTemplate>
Item @context.Text
</ItemTextTemplate>
<Items>
<DxMenuItem Text="1" />
<DxMenuItem Text="2" />
</Items>
</DxMenu>
</div>