Back to Devexpress

DxToastProvider.SizeMode Property

blazor-devexpress-dot-blazor-dot-dxtoastprovider-f91272d1.md

latest2.3 KB
Original Source

DxToastProvider.SizeMode Property

Specifies the size of toast notifications and their content.

Namespace : DevExpress.Blazor

Assembly : DevExpress.Blazor.v25.2.dll

NuGet Package : DevExpress.Blazor

Declaration

csharp
[DefaultValue(null)]
[Parameter]
public SizeMode? SizeMode { get; set; }

Property Value

TypeDefaultDescription
Nullable<SizeMode>null

The size mode. If the property is not specified (the value is null), the size is determined by the SizeMode global option.

|

Available values:

NameDescription
Small

Small size.

| | Medium |

Medium size.

| | Large |

Large size.

|

Remarks

The SizeMode property allows you to apply different size modes to DxToast components related to the DxToastProvider. For additional information, refer to the following topic: Size Modes.

The following code snippet applies the Large size mode to the DxToastProvider component.

razor
<DxButton Text="Show Toasts" Click="ShowToasts" />
<DxToastProvider SizeMode="SizeMode.Large" ThemeMode="ToastThemeMode.Pastel" />

<DxToast @ref=completedTask Text="The process is completed." RenderStyle="ToastRenderStyle.Success" />
<DxToast @ref=noAccess Text="The process cannot access the file." RenderStyle="ToastRenderStyle.Warning" />
<DxToast @ref=fileDownloaded Text="The 'img.png' file is downloaded." RenderStyle="ToastRenderStyle.Info" />

@code {
    DxToast completedTask;
    DxToast noAccess;
    DxToast fileDownloaded;

    private void ShowToasts() {
        completedTask.Show();
        noAccess.Show();
        fileDownloaded.Show();
    }
}

Run Demo: Toast Notification - Overview

See Also

DxToastProvider Class

DxToastProvider Members

DevExpress.Blazor Namespace