---
title: Build the top menu and toolbar
summary: Construct the `SAIFMenuTop` control tree — the top page-link row and the full set of toolbar action icons.
status: draft
owner: SAIF Doc Gen
last_reviewed: 2026-08-17
library: SAIF.Presentation.Web.Controls.V2.Menu
reference_type: package
operation_id: OP-MENU-011
trigger: "`SAIFMenuTop.CreateChildControls`, invoked during the ASP.NET control-tree creation phase."
---

# Build the top menu and toolbar

Construct the `SAIFMenuTop` control tree — the top page-link row and the full set of toolbar action icons. This operation is implemented by `SAIFMenuTop.CreateChildControls`, `SAIFMenuTop.BuildMenuIcons`.

| Field | Value |
| --- | --- |
| **Operation ID** | OP-MENU-011 |
| **Trigger** | `SAIFMenuTop.CreateChildControls`, invoked during the ASP.NET control-tree creation phase. |
| **Inputs** | Navigation data (see [Acquire navigation data](acquire-navigation-data.md)). |
| **Outputs** | `TopMenuApp-row` link panel; `TopMenuIcons` panel with all toolbar `SAIFImageButton` icons. |
| **Primary components** | `SAIFMenuTop.CreateChildControls`, `SAIFMenuTop.BuildMenuIcons` |
| **Entry point** | `SAIF.Presentation.Web.Controls.V2.Menu/SAIFMenuTop.vb` |

## Steps

1. Build the link collection from navigation data (see [Build top page links](build-top-page-links.md)) and add the links to a `TopMenuApp-row` panel inside the `topmenubox` navigation panel. Enforces [BR-MENU-052](../business-rules.md#br-menu-052-top-page-links-render-inside-the-topmenuapp-row-panel).
2. Build the toolbar icons into the `TopMenuIcons` panel: `imgTopDefaultOnSubmit` (a zero-sized default submit button), `mnuHelp`, preference save/clear, and the insert/save/delete/edit/cancel/submit and print/preview/email/download/calculate icons, each a `SAIFImageButton` wired to `MenuImage_Click` and registered in the `clsMenuButton` dictionary. Enforces [BR-MENU-053](../business-rules.md#br-menu-053-every-toolbar-icon-is-a-registered-saifimagebutton), [BR-MENU-054](../business-rules.md#br-menu-054-toolbar-button-state-is-serialized-into-view-state).

## Process flow

The following diagram visualizes this operation's control flow.

```mermaid
flowchart TD
	Start(["SAIFMenuTop.CreateChildControls"]) --> Links["Build link collection from navigation data"]
	Links --> Panel["Add links to TopMenuApp-row panel in topmenubox"]
	Panel --> Icons["Build toolbar icons into TopMenuIcons panel"]
	Icons --> Wire["Wire each SAIFImageButton to MenuImage_Click"]
	Wire --> Register["Register icon in clsMenuButton dictionary"]
	Register --> End(["TopMenuApp-row link panel plus TopMenuIcons panel"])
```

## Failure and edge-case behavior

- No exceptional failure paths beyond those noted in the steps above.

## Related documentation
- [Operations and processes](../operations-processes.md)
- [Business rules](../business-rules.md)
- [Database tables](../database-tables.md)

## Sources
- `SAIF.Presentation.Web.Controls.V2.Menu/SAIFMenuTop.vb`
