Skip to main content

ContextMenu

Family: Shells & Overlays
Namespace: Tessera.Controls

Use ContextMenu when this interaction is the best match for your screen workflow.

When to use

  • You need a ContextMenu-style interaction inside the shells & overlays lane.
  • A titled widget surface improves scanability in dense shells.
  • You want explicit user-driven events routed into app state updates.

Minimal usage

csharp.cs
using Tessera.Controls;
using Tessera.Layout;

var widget = new ContextMenu
{
    Title = "ContextMenu"
};

return Screen.Build(window => window.Body(body => body.Center(widget, width: 44, height: 9)));

Common pitfalls

  • Do not choose ContextMenu by name only; validate it against the target workflow.
  • Keep this control scoped to the shells & overlays concern; avoid cross-layer state coupling.
  • Handle control events by posting/processing messages; avoid hidden mutation in render paths.
  • Set focused/normal styles intentionally so keyboard focus remains obvious.
  • Keep disabled state explicit and reversible so users understand why actions are blocked.

Public properties

PropertyType
AnchorXint
AnchorYint
BorderBorderStyle
BorderStyleTextTesseraStyle
DisabledItemStyleTesseraStyle
FocusedBorderStyleTextTesseraStyle
FocusedTitleStyleTesseraStyle
FocusMarkerstring
HoveredItemStyleTesseraStyle
IsDisabledbool
IsFocusedbool
IsReadOnlybool
IsVisiblebool
ItemStyleTesseraStyle
LastExecutedItemIdstring?
MutedItemStyleTesseraStyle
PaddingThickness
SelectedItemStyleTesseraStyle
ShowFocusMarkerbool
Titlestring
TitleStyleTesseraStyle

Public events

EventType
ItemExecutedEventHandler<ContextMenuItemExecutedEventArgs>?