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

ToastOptions Class

Defines options for a toast notification.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.1.dll

Declaration

public class ToastOptions

Remarks

The ToastOptions object allows you to set up toast settings when you create a toast notification at runtime.

<style>
    .italic-text {
        font-style: italic;
        text-align: center;
    }
</style>

<DxButton Text="Show a toast" Click="CreateToastAtRuntime" />
<DxToastProvider />

@code {
    [Inject] IToastNotificationService ToastService { get; set; }

    private void CreateToastAtRuntime() {
        ToastService.ShowToast(new ToastOptions {
            Title = "Notification",
            Text = "The process is completed.",
            ShowIcon = false,
            CssClass = "italic-text",
            ThemeMode = ToastThemeMode.Pastel,
            ShowCloseButton = false,
        });
    }
}

Customized toast notification

Inheritance

Object
ToastOptions
See Also