Skip to main content
All docs
V25.1
  • ToastOptions.ProviderName Property

    The name of a provider that will display the notification.

    Namespace: DevExpress.Blazor

    Assembly: DevExpress.Blazor.v25.1.dll

    NuGet Package: DevExpress.Blazor

    Declaration

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

    Property Value

    Type Default Description
    String String.Empty

    The provider name.

    Remarks

    The DxToastProvider component serves as a toast container and should be declared in the place where toasts will be displayed. If a page contains several DxToastProvider objects, use the ProviderName property to define a provider that will display the toast notification.

    The ProviderName property value must match the Name value of a toast 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