alexa
menu

Blazor

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

    Show / Hide Table of Contents

    Class BlockEditorContextMenu

    Gets or sets the settings for the context menu within the editor.

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

    This menu allows quick access to contextual actions related to selected blocks or text.

    Constructors

    BlockEditorContextMenu()

    Declaration
    public BlockEditorContextMenu()

    Properties

    Closing

    Triggers when the context menu is being closed.

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

    An event callback that provides the ContextMenuClosingEventArgs.

    Remarks

    This is triggered when the menu is dismissed either by selecting an action or clicking outside.

    Enable

    Specifies whether the context menu is enabled.

    Declaration
    [Parameter]
    public bool Enable { get; set; }
    Property Value
    Type Description
    bool

    A boolean value that indicates whether the context menu menu is enabled. The default value is true.

    Remarks

    If set to false, the context menu will not be displayed.

    ItemSelect

    Triggers when an menu item is selected from the context menu.

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

    An event callback that provides the ContextMenuItemSelectEventArgs.

    Remarks

    This event helps to identify which menu item was selected and apply the corresponding logic.

    Examples
    private void OnItemSelect(ContextMenuItemSelectEventArgs args)
    {
        Console.WriteLine($""Action selected: {args.Item}"");
    }

    Items

    Gets or sets the list of context menu items.

    Declaration
    [Parameter]
    public List<ContextMenuItemModel> Items { get; set; }
    Property Value
    Type
    List<ContextMenuItemModel>

    Opening

    Triggers when the context menu is being opened.

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

    An event callback that provides the ContextMenuOpeningEventArgs.

    Remarks

    You can use this event to perform additional logic such as disabling a particular menu item for a particular block while the context menu becomes visible.

    ShowItemOnClick

    Specifies whether menu items should only be shown when clicked.

    Declaration
    [Parameter]
    public bool ShowItemOnClick { get; set; }
    Property Value
    Type Description
    bool

    A boolean value that indicates whether menu items should only be shown when clicked. The default value is false.

    Remarks

    If set to true, submenu items appear only when the parent item is clicked.

    Methods

    Dispose(bool)

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

    OnInitializedAsync()

    Declaration
    protected override Task OnInitializedAsync()
    Returns
    Type
    Task
    Overrides
    ComponentBase.OnInitializedAsync()

    Implements

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