Context menus
Connection and form context menus.
In this documentation
- Beep.Forms
- Architecture
- Authoring in the Object Navigator
- WinForms runtime
- WPF runtime
- End-to-end example
- Remote UI limitations
- Overview
- Context menus
- Blocks and items
- Triggers
- Lists of values
- Validation
- Master detail
- Navigation and queries
- Alerts, editors and timers
- Calling other forms
- Form menus
- Hosting in WinForms step by step
- Hosting in WPF step by step
- Saving and loading forms
- The IDE toolbar and dialogs
- Troubleshooting
Status: shipped. Right‑click menus are live; the once-planned "visible glyph" was never built and cannot be built as specified — see §2. The plan of record is
../.plans/ENHANCEMENT-PLAN-2026-07.md(the old v1.6 restoration plan it used to cite was deleted). Read alongside:../ARCHITECTURE.md§ "Toolbar & context-menu architecture (v1.6)".
1. Why this doc exists
In v1.5 the ContextMenu resources on the tree were bound via
Setter Property="ContextMenu" on
TreeView.ItemContainerStyle, which the Remote UI
out‑of‑process host does not transport. The menus existed in the
XAML but were silent in the live tool window. v1.6 attaches the
menus to a Border inside the row template, which is part of
the shipped visual tree and therefore does cross the boundary.
This doc is the per‑NodeType reference for the v1.6 menus — what
items appear, what command they fire, and what conditional
visibility applies.
2. How a row's menu is reached
Right-click anywhere on the row body. That is the only way to open the menu,
and the menu is the inline Border.ContextMenu in the row template.
Separately, double-click or Enter runs the row's primary action —
ExecuteSelectedNodePrimaryActionCommand, which dispatches per NodeType
(open a form, toggle a connection, jump to a trigger's handler). That is an
activation, not the menu.
There is no
⋯glyph. This section used to describe a second entry point — "left-click the⋯glyph in the row's rightmost column… implemented as aButtonwhoseContextMenuis opened programmatically" — and no such control has ever existed in the row template.It is not an oversight to fix by adding a Button. Opening a popup on left-click is an imperative act, and the only click mechanism that crosses the Remote UI boundary (
vs:ExtensibilityUICommands.EventHandlerswithEvent="Click") dispatches aCommand— there is no command that means "open my own context menu", and code-behind does not cross the boundary at all. The toolbar buttons pair aClickcommand with aButton.ContextMenufor their variants (a split-button idiom), and right-click is what opens that menu there too.So a row glyph could only ever offer right-click — which the whole row already offers. Do not re-add this claim without a control that demonstrably works in the experimental hive.
A block row's menu as it actually binds today (see §3 for every scope):
┌─────────────────────────────────────────────────────────┐
│ [icon] Display name Block [type] [✓] │ ← row
├─────────────────────────────────────────────────────────┤
│ Open in Property Palette │ ← right‑click
│ Edit Block Entity… / Navigation… / Metadata… / Fields… │
│ Configure Query… │
│ ───────── │
│ Generate / Sync / Remove All Field Controls │
│ Field Controls Info · Open Field Default Policy │
│ ───────── │
│ New Block · New Relation… · Add Trigger… │
│ New Item Trigger… · Release All Savepoints │
│ ───────── │
│ Clear All Triggers / Validation Rules / Block Items │
│ Clear Security Rule · Unlock Current / All Records │
│ ───────── │
│ Delete Block │
└─────────────────────────────────────────────────────────┘
This sketch used to show Add Armed Field Here, Edit Block Settings,
Regenerate Controls, Pin and Favourite, none of which exist — Pin and
Favourite are declared nowhere at all. It also showed Add Trigger… and
Delete Block, which were implemented but unreachable; both are now wired, along
with 19 others (§7).
3. Per-scope reference
Generated from the XAML, not from intent. Each row template gates its menu
items on a derived Is* bool on DataBlockTreeNode, so the gate — not the
NodeType — is what decides whether an item appears. The tables below list what
BeepDataBlocksNavigatorContent.xaml actually binds today.
2026-08-07. This section previously listed fifteen commands that were declared nowhere in the codebase —
Pin/Unpin/ToggleFavourite,OpenRecentsPanel,CompareTriggers,ConfigureForms,UninstallDriver,OpenDriverPackage,ScaffoldMasterDetailPair,SetPreferredForm,ClearPreferredForm,ClearPreferredConnection,StartDragPayload,TestLovPlayground, andOpenTriggerHandlerFromNode— plus a wholeDrivermenu for a provider that is not registered. None had XAML bindings, so no dead items ever reached the UI; the damage was that the doc read as a shipped feature list.SmokeTests/ContextMenuDocConformance.csnow fails the build if a command named here is not declared. Notecommand-reachability.pycannot catch this: it walks outward from declared commands, so one that exists only in prose is not in its input.
IsDataSourceRoot — the "Data Sources" root
| Menu item | Command |
|---|---|
| Add Connection | AddConnectionCommand |
| Refresh All | RefreshCommand |
| Refresh Connections | RefreshConnectionsCommand |
IsFormsRoot — the "Forms" root
| Menu item | Command |
|---|---|
| Create Form from Template… | CreateFormFromTemplateCommand |
| Scan Solution for Forms | ScanFormsCommand |
| Refresh Forms | RefreshFormsCommand |
IsDataSource
| Menu item | Command |
|---|---|
| Open / Close | ToggleConnectionCommand |
| Open Connection | OpenConnectionCommand |
| Close Connection | CloseConnectionCommand |
| Test Now | TestConnectionFromNodeCommand |
| Edit Connection… | EditConnectionCommand |
| Copy Connection String | CopyConnectionStringCommand |
| Delete Connection | DeleteNodeCommand |
IsSchema
| Menu item | Command |
|---|---|
| Edit Connection… | EditConnectionCommand |
| Copy Qualified Name | CopyQualifiedNameCommand |
IsEntityNode
| Menu item | Command |
|---|---|
| Create Block from Entity | CreateBlockCommand |
| Arm for Scaffold | ArmScaffoldSourceCommand |
| Send to Preferred Form | SendToPreferredFormCommand |
| Copy Qualified Name | CopyQualifiedNameCommand |
"Arm for Scaffold" is the substitute for drag-and-drop, which cannot cross the
Remote UI boundary (REMOTE-UI-LIMITATIONS.md §3.7).
IsFieldNode
| Menu item | Command |
|---|---|
| Open in Property Palette | OpenItemCommand |
IsForeignKey
| Menu item | Command |
|---|---|
| Edit Relationship… | EditRelationshipCommand |
| Open in Property Palette | OpenBlockCommand |
| Delete Relation | DeleteRelationCommand |
Emitted by two providers and the menu is shared: a database foreign key under an entity (Data Sources tree), and the master-detail relation under a detail block (Forms tree). The Forms-tree row reuses this node type precisely so it inherits this menu without a new XAML binding.
IsIndex
| Menu item | Command |
|---|---|
| Open in Property Palette | OpenBlockCommand |
| Copy Qualified Name | CopyQualifiedNameCommand |
IsForm
| Menu item | Command |
|---|---|
| Open in Designer | OpenFormCommand |
| Create Block | CreateBlockCommand |
| Build Menu… | EditFormMenuCommand |
| Set Preferred Connection… | SetPreferredConnectionCommand |
| Validate | ValidateFormCommand |
| Form Properties… | FormPropertiesCommand |
| Add Trigger… | AddTriggerCommand |
| New Record Group… | EditRecordGroupCommand |
| New Parameter List… | EditParameterListCommand |
| New Alert… | EditAlertCommand |
| New Editor… | EditEditorObjectCommand |
| New Object Group… | EditObjectGroupCommand |
| Clear All Blocks | ClearAllBlocksCommand |
IsRecordGroupNode
| Menu item | Command |
|---|---|
| Edit Record Group… | EditRecordGroupCommand |
| Delete Record Group | DeleteRecordGroupCommand |
IsParameterListNode
| Menu item | Command |
|---|---|
| Edit Parameter List… | EditParameterListCommand |
| Delete Parameter List | DeleteParameterListCommand |
IsAlertNode
| Menu item | Command |
|---|---|
| Edit Alert… | EditAlertCommand |
| Delete Alert | DeleteAlertCommand |
IsEditorObjectNode
| Menu item | Command |
|---|---|
| Edit Editor… | EditEditorObjectCommand |
| Delete Editor | DeleteEditorObjectCommand |
IsObjectGroupNode
| Menu item | Command |
|---|---|
| Edit Object Group… | EditObjectGroupCommand |
| Delete Object Group | DeleteObjectGroupCommand |
IsMenuNode
| Menu item | Command |
|---|---|
| Build Menu… | EditFormMenuCommand |
IsBlock
| Menu item | Command |
|---|---|
| Open in Property Palette | OpenBlockCommand |
| Edit Block Entity… | EditBlockEntityCommand |
| Edit Block Navigation… | EditBlockNavigationCommand |
| Edit Block Metadata… | EditBlockMetadataCommand |
| Edit Block Fields… | EditBlockFieldsCommand |
| Configure Query… | ConfigureQueryCommand |
| Generate Field Controls | GenerateFieldControlsCommand |
| Sync Field Controls | SyncFieldControlsCommand |
| Remove All Field Controls | RemoveAllFieldControlsCommand |
| Field Controls Info | ShowFieldControlsInfoCommand |
| Open Field Default Policy | OpenFieldDefaultPolicyCommand |
| New Block | NewBlockCommand |
| New Relation… | NewRelationCommand |
| Add Trigger… | AddTriggerCommand |
| New Item Trigger… | NewItemTriggerCommand |
| Release All Savepoints | ReleaseAllSavepointsCommand |
| Clear All Triggers | ClearAllTriggersCommand |
| Clear All Validation Rules | ClearAllRulesCommand |
| Clear Block Items | ClearBlockItemsCommand |
| Clear Security Rule | ClearSecurityRuleCommand |
| Unlock Current Record | UnlockRecordCommand |
| Unlock All Records | UnlockAllRecordsCommand |
| Delete Block | DeleteBlockCommand |
IsItem
| Menu item | Command |
|---|---|
| Open in Property Palette | OpenItemCommand |
| Edit Triggers… | EditTriggerCommand |
| Edit LOVs… | EditLOVCommand |
| Edit Validations… | EditValidationsCommand |
| Edit Visual Attribute… | EditVisualAttributeCommand |
| Attach Editor Object… | EditItemEditorCommand |
| Remove Field Control | RemoveFieldControlCommand |
| Change Control Type… | ChangeFieldControlTypeCommand |
| Reset Binding | ResetFieldBindingsCommand |
| Add Trigger… | AddTriggerCommand |
| New Item… | NewItemCommand |
| Delete Item | DeleteItemCommand |
IsItemTriggerNode
| Menu item | Command |
|---|---|
| Open in Property Palette | OpenItemCommand |
| Edit Trigger… | EditTriggerCommand |
Click-to-code. Double-click (or Enter) on a trigger row runs
ExecuteSelectedNodePrimaryActionCommand, which for ItemTrigger/Trigger
opens the form's own .cs at the handler's line — Oracle Forms'
jump-to-trigger. The line is resolved on activation by TriggerHandlerLocator,
the same locator the Trigger editor uses, and the jump passes
OpenDocumentOptions(selection, ensureVisible) — note ensureVisible is a
Range, not the bool its name suggests.
IsItemLovNode
| Menu item | Command |
|---|---|
| Open in Property Palette | OpenItemCommand |
| Edit LOV… | EditLOVCommand |
| Test LOV… | TestLovCommand |
| Delete LOV | DeleteLovCommand |
IsItemValidationNode
| Menu item | Command |
|---|---|
| Open in Property Palette | OpenItemCommand |
| Edit Validation… | EditValidationsCommand |
| Delete Validation | DeleteValidationCommand |
IsScaffoldTarget
| Menu item | Command |
|---|---|
| Drop Here | DropPendingToFormCommand |
| Scaffold to Preferred Form | ScaffoldPendingToPreferredFormCommand |
| Clear Pending Drop | ClearPendingDropCommand |
Toolbar (always visible)
RefreshCommand, RefreshConnectionsCommand, ScanFormsCommand,
AddConnectionCommand, DownloadDriversCommand, CreateFormFromTemplateCommand,
OpenFieldDefaultPolicyCommand, ShowBuiltinsPlaygroundCommand,
ExpandAllCommand, CollapseAllCommand, OpenFindObjectDialogCommand,
ClearSearchCommand, ClearExplorerFiltersCommand.
Not present
There is no Driver row menu. NodeType.Driver and
DriverCatalogNavigatorProvider exist, but that provider is deliberately not
registered (BeepDataBlocksNavigatorData.InitializeAsync registers only the
connection and form providers), so no driver rows are emitted and no menu binds
to them. Drivers are reached from the toolbar's DownloadDriversCommand.
4. XAML pattern
The v1.6 row template (in
BeepDataBlocksNavigatorContent.xaml) attaches the menu via
Style.Triggers on Border.ContextMenu. The dead
Setter Property="ContextMenu" block in
TreeView.ItemContainerStyle was removed in PR1 — the
in‑proc WPF engine consumed that setter before the tree was
serialised across the Remote UI process boundary, and the
resulting TreeViewItem (generated by the remote host) never
got the menu. The fix is to attach the menu to a Border
inside the row template, which is part of the shipped visual
tree.
<Border>
<Border.Style>
<Style TargetType="Border">
<Style.Triggers>
<DataTrigger Binding="{Binding IsConnection}" Value="True">
<Setter Property="ContextMenu" Value="{StaticResource ConnectionRowMenu}" />
</DataTrigger>
<DataTrigger Binding="{Binding IsForm}" Value="True">
<Setter Property="ContextMenu" Value="{StaticResource FormRowMenu}" />
</DataTrigger>
<!-- … one trigger per NodeType … -->
</Style.Triggers>
</Style>
</Border.Style>
<!-- … row content … -->
</Border>
The row's menu is an inline Border.ContextMenu in the row template, not a
shared Grid.Resources entry: Setter Property="ContextMenu" on
ItemContainerStyle does not cross the Remote UI boundary (§1). Every scope's
items live in that one menu and are gated by Visibility (§3). There is no
⋯ button to share it with (§2).
Conditional visibility
There are two ways to gate a menu item:
- Command‑level gating — the command itself is a no‑op when
the condition is false. The menu item is always visible.
Used for
Open / Close(one menu item, one command that toggles). Style.Triggerson theMenuItem— the menu item is collapsed when the condition is false. Used for theBlockPresentationModeitems and theHasPendingDropPayloaditems. This is the v1.5 pattern that does work in Remote UI (it does not need aSetteron a generated control).
<MenuItem Header="Generate Field Controls" ToolTip="…">
<MenuItem.Style>
<Style TargetType="MenuItem">
<Setter Property="Visibility" Value="Visible" />
<Style.Triggers>
<DataTrigger Binding="{Binding BlockPresentationMode}" Value="DesignerGenerated">
<Setter Property="Visibility" Value="Collapsed" />
</DataTrigger>
</Style.Triggers>
</Style>
</MenuItem.Style>
<vs:ExtensibilityUICommands.EventHandlers>
<vs:EventHandlerCollection>
<vs:EventHandler Command="{Binding DataContext.GenerateFieldControlsCommand, ElementName=RootGrid}"
CommandParameter="{Binding}"
Event="Click" />
</vs:EventHandlerCollection>
</vs:ExtensibilityUICommands.EventHandlers>
</MenuItem>
5. Adding a new menu item
- Add the
AsyncCommandto the data context in a newBeepDataBlocksNavigatorData.Commands.<Concern>.cspartial and initialise it inInitializeCommands(). - Identify which
NodeTypethe item belongs to. - Edit
BeepDataBlocksNavigatorContent.xaml: - Locate the corresponding
ContextMenuresource (e.g.ConnectionRowMenu). - Add a
<MenuItem>with a header, tooltip, and thevs:ExtensibilityUICommands.EventHandlersblock that bindsCommandto the newAsyncCommand. - If the item is conditionally visible, add a
<MenuItem.Style>with aStyle.Triggersblock. - Add a smoke test in
SmokeTests/RemoteUiContextMenuXamlSmoke.csthat asserts the new menu item is present for the relevantNodeType, and a documentation check inSmokeTests/ContextMenuDocConformance.csso this file and the XAML cannot drift apart.
6. Smoke test
SmokeTests/RemoteUiContextMenuXamlSmoke.cs asserts the dead
Setter Property="ContextMenu" pattern is gone and that
Border.ContextMenu + Style.Triggers binds every NodeType to its
menu resource. SmokeTests/ContextMenuDocConformance.cs then checks
this document against the code: every command documented here must be
declared, every navigator command must be bound, and every dialog must
be constructed.
(This section named RemoteUiContextMenuTests and a
SmokeHarness base class in TriggerTaxonomySmoke.
Neither file exists — there is no base class; each check is a static
Run() that increments a Failures counter, and SmokeTests/Program.cs
calls them in order. Copy that shape.)
The regression guard: if a future refactor moves the menu back
to Setter Property="ContextMenu" on TreeView.ItemContainerStyle,
the smoke fails because the menu resource will not be reachable
through the row template.
7. Commands with no row to live on
21 of the 25 previously-unbound navigator commands are now wired into the row
menus in §3 — every Delete …, the Clear … bulk verbs, Add Trigger…,
New Block, New Item…, New Relation…, New Item Trigger…,
Release All Savepoints, Field Controls Info, and explicit
Open/Close Connection. They were implemented, registered and reaching real
code the whole time; nothing in the UI reached them.
Four remain unbound, and cannot be bound:
| Command | Why |
|---|---|
NewLovCommand |
NodeType.Lov — engine-runtime leaf; provider not registered |
NewValidationCommand |
NodeType.Validation — engine-runtime leaf; provider not registered |
NewSavepointCommand |
NodeType.FormRoot — Forms Manager root; provider not registered |
OpenActiveFormCommand |
needs an active FormsManager; no row emits it |
AddDeleteWorkflowRouter scopes each to a NodeType that
BeepDataBlocksNavigatorData.InitializeAsync never produces — only the
connection and form providers are registered, and the Forms-Manager, Data-Blocks
and Driver providers are permanently not navigation surfaces (see the comment
at the registration site). There is no row to hang these on. Register one of
those providers and the check below starts failing until they are wired, which
is the point.
Two traps worth remembering:
tools/command-reachability.pycannot see this class of defect. It proves a command reaches real code; it says nothing about whether any UI reaches the command. All 25 counted as reachable by its measure.AddDeleteWorkflowRouterlooks like the dispatcher and is not. It maps node types to command names and is referenced only by SmokeTests — no runtime code routes through it. Its passing assertions describe a table, not a wired feature.
SmokeTests/ContextMenuDocConformance.cs enforces all of this: every documented
command must be declared, every declared navigator command must be bound unless
it is on the four-entry unbindable list, and every dialog must be constructed
somewhere.