blazor-devexpress-dot-blazor-dot-dxtoastprovider-f91272d1.md
Specifies the size of toast notifications and their content.
Namespace : DevExpress.Blazor
Assembly : DevExpress.Blazor.v25.2.dll
NuGet Package : DevExpress.Blazor
[DefaultValue(null)]
[Parameter]
public SizeMode? SizeMode { get; set; }
| Type | Default | Description |
|---|---|---|
| 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:
| Name | Description |
|---|---|
| Small |
Small size.
| | Medium |
Medium size.
| | Large |
Large size.
|
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.
<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