Skip to main content
You are viewing help content for pre-release software. This document and the features it describes are subject to change.
All docs
V24.1

DxToastProvider Class

A component that displays toast notifications.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.1.dll

Declaration

public class DxToastProvider :
    DxSizableComponentBase,
    IDisposable

Remarks

The DxToastProvider component serves as a toast container and should be declared in the place where toasts will be displayed. Use the provider properties to define common toast settings.

<DxButton RenderStyle="ButtonRenderStyle.Secondary" Text="Show toast notification" Click="ShowToast" />
<DxButton RenderStyle="ButtonRenderStyle.Secondary" Text="Close toast notification" Click="CloseToast" />
<DxToastProvider 
    AnimationType="ToastAnimationType.Fade" 
    HorizontalAlignment="HorizontalAlignment.Left"
    VerticalAlignment="VerticalEdge.Top"
    RenderStyle="ToastRenderStyle.Success" 
    ThemeMode="ToastThemeMode.Saturated"/>

<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();
    }
}

Inheritance

See Also