alexa
menu

Blazor

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

    Show / Hide Table of Contents

    Class CommandMenu

    Represents the command menu configuration for the SfInlineAIAssist component, providing options to customize the command popup behavior and handle command item selection.

    Inheritance
    object
    ComponentBase
    OwningComponentBase
    CommandMenu
    Implements
    IComponent
    IHandleEvent
    IHandleAfterRender
    IDisposable
    Inherited Members
    ComponentBase.Assets
    ComponentBase.AssignedRenderMode
    ComponentBase.DispatchExceptionAsync(Exception)
    ComponentBase.InvokeAsync(Action)
    ComponentBase.InvokeAsync(Func<Task>)
    ComponentBase.OnAfterRender(bool)
    ComponentBase.OnAfterRenderAsync(bool)
    ComponentBase.OnInitialized()
    ComponentBase.OnParametersSet()
    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()
    OwningComponentBase.IsDisposed
    OwningComponentBase.ScopedServices
    Namespace: Syncfusion.Blazor.InteractiveChat
    Assembly: Syncfusion.Blazor.InteractiveChat.dll
    Syntax
    public class CommandMenu : OwningComponentBase, IComponent, IHandleEvent, IHandleAfterRender, IDisposable
    Remarks

    Use this class to configure command menu related settings within the SfInlineAIAssist component.

    Examples

    The following example demonstrates how to declare and configure an CommandMenu inside the SfInlineAIAssist component.

    <SfInlineAIAssist>
        <CommandMenu Commands="@commandItems" PopupWidth = "300px" PopupHeight = "auto" ItemSelect = "@HandleCommandItemSelect">
        </CommandMenu>
    </SfInlineAIAssist>
    
    @code {
        private List<CommandItem> commandItems = new List<CommandItem>()
        {
            new CommandItem
            {
                IconCss = "e-icons",
                Label = "Copy",
                Prompt = "Copy the selected content",
                Tooltip = "Copy text",
                Disabled = false,
                GroupBy = "Clipboard",
                ID = "copyCommand"
            }
         };
    
        private void HandleCommandItemSelect(CommandItemSelectEventArgs args)
        {
            if (args.Command.ID == "restrictedCommand")
            {
                args.Cancel = true;
            }
        }
    }

    Constructors

    CommandMenu()

    Declaration
    public CommandMenu()

    Properties

    Commands

    Gets or sets the collection of CommandItem instances configured within the CommandMenu of the SfInlineAIAssist component.

    Declaration
    [Parameter]
    public List<CommandItem> Commands { get; set; }
    Property Value
    Type Description
    List<CommandItem>

    A List<T> of CommandItem representing the command items displayed in the command popup. The default value is an empty collection.

    Remarks

    Use this property to define and configure the list of CommandItem instances that appear in the command popup of the SfInlineAIAssist component.

    ItemSelect

    Gets or sets the callback that is invoked when a command item is selected.

    Declaration
    [Parameter]
    public EventCallback<CommandItemSelectEventArgs> ItemSelect { get; set; }
    Property Value
    Type Description
    EventCallback<CommandItemSelectEventArgs>

    An EventCallback<TValue> of type CommandItemSelectEventArgs that handles the item selection event. The default value is an empty callback (no handler is assigned).

    PopupHeight

    Gets or sets the height of the command popup in the SfInlineAIAssist component.

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

    A string representing the height of the command popup. The default value is "auto".

    Remarks

    Accepts any valid CSS height value, including pixel units (e.g., "200px"), percentage values (e.g., "50%"), or other CSS length units such as "10rem".

    PopupWidth

    Gets or sets the width of the command popup in the SfInlineAIAssist component.

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

    A string representing the width of the command popup. The default value is String.Empty.

    Remarks

    Accepts any valid CSS width value, including pixel units (e.g., "300px"), percentage values (e.g., "50%"), or other CSS length units such as "20rem".

    Methods

    BuildRenderTree(RenderTreeBuilder)

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

    Dispose(bool)

    Dispose unmanaged resources in the Syncfusion Blazor component.

    Declaration
    protected override void Dispose(bool disposing)
    Parameters
    Type Name Description
    bool disposing

    Boolean value to dispose the object.

    Overrides
    OwningComponentBase.Dispose(bool)

    OnInitializedAsync()

    Method invoked when the component is ready to start.

    Declaration
    protected override Task OnInitializedAsync()
    Returns
    Type Description
    Task

    A System.Threading.Tasks.Task representing any asynchronous operation.

    Overrides
    ComponentBase.OnInitializedAsync()

    OnParametersSetAsync()

    Handles parameter updates for the InlineToolbar component.

    Declaration
    protected override Task OnParametersSetAsync()
    Returns
    Type Description
    Task

    A System.Threading.Tasks.Task representing any asynchronous operation.

    Overrides
    ComponentBase.OnParametersSetAsync()

    Implements

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