Skip to main content
All docs
V24.1

ToastOptions.MaxHeight Property

Limits the maximum height of the toast notification.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.1.dll

NuGet Package: DevExpress.Blazor

Declaration

[DefaultValue(null)]
public string MaxHeight { get; set; }

Property Value

Type Default Description
String null

The height in CSS units; null to derive the value from the toast provider.

Remarks

Toast notification height is determined automatically based on toast content. You can use the MaxHeight property to limit the maximum toast height. The DxToastProvider.Width property determines the toast width, which is the same for every toast in a provider.

<DxToastProvider Width="400px" />

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

    private void CreateToasts() {
        ToastService.ShowToast(new ToastOptions {
            MaxHeight="150px",
            Title="Notification",
            Text="The process is completed.",
        });
    }
}
See Also