Skip to main content
All docs
V24.2

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

DxToast.Show() Method

In This Article

Shows the toast notification.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.2.dll

NuGet Package: DevExpress.Blazor

#Declaration

C#
public void Show()

#Remarks

Call the Show method to show the toast notification. The toast automatically disappears after its display time is over (DisplayTime). If the display time is set to zero, the toast stays visible until it is closed forcibly by a call to the Close() or IToastNotificationService.CloseToast method.

Run Demo: Toast Template

razor
<DxButton RenderStyle="ButtonRenderStyle.Secondary" Text="Show toast notification" Click="ShowToast" />
<DxButton RenderStyle="ButtonRenderStyle.Secondary" Text="Close toast notification" Click="CloseToast" />
<DxToastProvider />

<DxToast @ref=toast
          DisplayTime="@TimeSpan.Zero"
          Title="Notification"
          Text="The process is completed." />
@code {
    DxToast toast;
    private void ShowToast() {
        toast.Show();
    }
    private void CloseToast() {
        toast.Close();
    }
}
See Also