alexa
menu

Blazor

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Search Results for

    Show / Hide Table of Contents

    Class WebMcpConfirmDialog

    SfDialog host for the WebMCP confirmation gate. Modeled on Modules/Link/Link.razor.cs:

    • ComponentBase with a cascading SfRichTextEditor parent.
    • dialogRef captured once the <SfDialog @ref&gt; mounts.
    • ShowAsync(string, string) flips enableDialog and forces a render so the @if (Parent != null && enableDialog) guard in the .razor materializes the dialog markup.
    • Syncfusion.Blazor.RichTextEditor.WebMcpConfirmDialog.OnAllow / Syncfusion.Blazor.RichTextEditor.WebMcpConfirmDialog.OnDeny mirror the Insert / Cancel handlers in Link.razor.cs: hide the dialog, resolve the pending task.
    Inheritance
    object
    ComponentBase
    WebMcpConfirmDialog
    Implements
    IComponent
    IHandleEvent
    IHandleAfterRender
    Inherited Members
    ComponentBase.Assets
    ComponentBase.AssignedRenderMode
    ComponentBase.DispatchExceptionAsync(Exception)
    ComponentBase.InvokeAsync(Action)
    ComponentBase.InvokeAsync(Func<Task>)
    ComponentBase.OnAfterRender(bool)
    ComponentBase.OnAfterRenderAsync(bool)
    ComponentBase.OnInitializedAsync()
    ComponentBase.OnParametersSet()
    ComponentBase.OnParametersSetAsync()
    ComponentBase.RendererInfo
    ComponentBase.SetParametersAsync(ParameterView)
    ComponentBase.ShouldRender()
    ComponentBase.StateHasChanged()
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Syncfusion.Blazor.RichTextEditor
    Assembly: Syncfusion.Blazor.RichTextEditor.dll
    Syntax
    public class WebMcpConfirmDialog : ComponentBase, IComponent, IHandleEvent, IHandleAfterRender

    Constructors

    WebMcpConfirmDialog()

    Declaration
    public WebMcpConfirmDialog()

    Properties

    AllowText

    Allow button label. Defaults to "Allow".

    Declaration
    [Parameter]
    public string AllowText { get; set; }
    Property Value
    Type
    string

    DefaultHeaderText

    Dialog header. Defaults to "Confirm AI tool execution".

    Declaration
    [Parameter]
    public string DefaultHeaderText { get; set; }
    Property Value
    Type
    string

    DenyText

    Deny button label. Defaults to "Deny".

    Declaration
    [Parameter]
    public string DenyText { get; set; }
    Property Value
    Type
    string

    Methods

    BuildRenderTree(RenderTreeBuilder)

    Declaration
    protected override void BuildRenderTree(RenderTreeBuilder __builder)
    Parameters
    Type Name Description
    RenderTreeBuilder __builder
    Overrides
    ComponentBase.BuildRenderTree(RenderTreeBuilder)

    HideDialog(string?)

    Programmatic close (used by Allow / Deny / Escape).

    Declaration
    public Task HideDialog(string? args = null)
    Parameters
    Type Name Description
    string args
    Returns
    Type
    Task

    OnInitialized()

    Declaration
    protected override void OnInitialized()
    Overrides
    ComponentBase.OnInitialized()

    ShowAsync(string, string)

    Open the confirmation dialog for the given tool invocation. Mirrors Link.ShowDialog(LinkFormModel, string):

    1. Pre-fills header / prompt / command.
    2. Sets enableDialog = true (this is what flips the .razor @if guard).
    3. await InvokeAsync(() => StateHasChanged()) to force the render. Returns a Task that resolves to true on Allow, false on Deny / Escape.
    Declaration
    public Task<bool> ShowAsync(string command, string prompt)
    Parameters
    Type Name Description
    string command
    string prompt
    Returns
    Type
    Task<bool>

    Implements

    IComponent
    IHandleEvent
    IHandleAfterRender
    In this article
    Back to top Generated by DocFX
    Copyright © 2001 - 2026 Syncfusion Inc. All Rights Reserved