alexa
menu

Blazor Toolkit

    Show / Hide Table of Contents

    Class SfDialogProvider

    The DialogProvider component serves as a target container where built-in dialogs are rendered using ConfirmAsync(String, String, DialogOptions), AlertAsync(String, String, DialogOptions), and PromptAsync(String, String, DialogOptions) methods from the SfDialogService.

    Inheritance
    System.Object
    SfDialogProvider
    Implements
    System.IDisposable
    Namespace: Syncfusion.Blazor.Toolkit.Popups
    Assembly: Syncfusion.Blazor.Toolkit.dll
    Syntax
    public class SfDialogProvider : ComponentBase, IDisposable
    Remarks

    It is recommended to add this component in MainLayout.razor to enable utility dialogs to be displayed from anywhere in the application. If you add this component to a specific page, the utility dialogs will only be available for that particular page. The component automatically handles the lifecycle of dialogs created through the SfDialogService, including their opening, closing, and result handling.

    Examples

    Adding the DialogProvider component to your application layout.

    @* In MainLayout.razor *@
    <div class="page">
        <div class="sidebar">
            <NavMenu />
        </div>
        <main>
            <div class="top-row px-4">
                <a href="https://docs.microsoft.com/aspnet/" target="_blank">About</a>
            </div>
            <article class="content px-4">
                @Body
            </article>
        </main>
    </div>
    <SfDialogProvider />

    Constructors

    SfDialogProvider()

    Declaration
    public SfDialogProvider()

    Methods

    BuildRenderTree(RenderTreeBuilder)

    Declaration
    protected override void BuildRenderTree(RenderTreeBuilder __builder)
    Parameters
    Type Name Description
    Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder

    Implements

    System.IDisposable
    Back to top Generated by DocFX
    Copyright © 2001 - 2026 Syncfusion Inc. All Rights Reserved