blazor-devexpress-dot-blazor-dot-dxtoast-dadb21f6.md
Specifies the template displayed in the toast notification.
Namespace : DevExpress.Blazor
Assembly : DevExpress.Blazor.v25.2.dll
NuGet Package : DevExpress.Blazor
[Parameter]
public RenderFragment Template { get; set; }
| Type | Description |
|---|---|
| RenderFragment |
Template content.
|
Use the Template property to add custom content to the toast notification. The specified render fragment is displayed under toast title and text content.
Alternatively, you can specify a template as the component’s ChildContent (see approach 2).
<DxToast @ref=toastButtons Title="Toast with buttons">
<Template>
<DxButton CssClass="mx-2">button 1</DxButton>
<DxButton RenderStyleMode="ButtonRenderStyleMode.Outline">button 2</DxButton>
</Template>
</DxToast>
<DxToast @ref=toastButtons Title="Toast with buttons">
<DxButton CssClass="mx-2">button 1</DxButton>
<DxButton RenderStyleMode="ButtonRenderStyleMode.Outline">button 2</DxButton>
</DxToast>
See Also