BcContextMenu
Description
The BcContextMenu component provides a customizable context menu for left-click, right-click, and middle-click interactions. It supports configurable delay times and multiple menu actions.
Information
The Phone will vibrate to signal the switch between Menus!
Sample
Parameters
ContextMenuDirection
BcContextMenuDirection
Defines the position of the context menu relative to the triggering element.
ChildContent
RenderFragment?
Specifies the content inside the main element that triggers the context menu.
LeftClickContent
RenderFragment < ContextMenuEvents >
Defines the content displayed when the element is left-clicked.
RightClickContent
RenderFragment < ContextMenuEvents >
Defines the content displayed when the element is right-clicked.
MiddleClickContent
RenderFragment < ContextMenuEvents >
Defines the content displayed when the element is middle-clicked.
RightClickLongPressDelay
TimeSpan
Determines the delay before a right-click long-press triggers the menu.
MiddleClickLongPressDelay
TimeSpan
Determines the delay before a middle-click long-press triggers the menu.
Methods
Closes the currently open context menu and hides its content.
Forces the component to recalculate its position and re-render.
Handles the mouse up event to determine which menu to open based on the mouse button clicked.
Handles touch start events, detecting long-press interactions for mobile users.
Handles touch end events to finalize menu selection based on touch duration.
Calculates the position of the context menu relative to its parent and updates its placement accordingly.