Skip to main content
All docs
V25.1
  • DxToastProvider.Name Property

    Specifies a name of the toast provider.

    Namespace: DevExpress.Blazor

    Assembly: DevExpress.Blazor.v25.1.dll

    NuGet Package: DevExpress.Blazor

    Declaration

    [DefaultValue("")]
    [Parameter]
    public string Name { get; set; }

    Property Value

    Type Default Description
    String String.Empty

    The name.

    Remarks

    Use the Name property to identify the toast provider when a page contains several DxToastProvider objects.

    Specify the DxToast.ProviderName or ToastOptions.ProviderName property to link the toast to a provider.

    <DxButton Text="Show a toast" Click="CreateToasts" />
    <DxToastProvider Name="WarningProvider" RenderStyle="ToastRenderStyle.Warning" />
    
    @code {
        [Inject] IToastNotificationService ToastService { get; set; }
    
        private void CreateToasts() {
            ToastService.ShowToast(new ToastOptions {
                ProviderName = "WarningProvider",
                Text = "The process cannot access the file.",
            });
        }
    }
    
    See Also