---
title: SAIFMenuTop
summary: API reference for SAIFMenuTop.
status: draft
owner: SAIF Doc Gen
last_reviewed: 2026-08-17
library: SAIF.Presentation.Web.Controls.V2.Menu
reference_type: package
---

# SAIFMenuTop

`SAIFMenuTop` renders the top navigation row (top-level application links) and the page action toolbar (Insert/Save/Delete/Edit/Cancel/Submit/Print/Preview/Email/Download/Calculate/Help/ Preferences icons). It derives each toolbar button's visibility and enabled state from the current page's authorised action-capability flags, showing each toolbar button only when the current page enables it ([BR-MENU-059](../../business-rules.md#br-menu-059-toolbar-buttons-appear-only-when-the-current-page-enables-them)), and raises a single `ToolbarClick` event carrying a `ToolBarButton` value for the hosting page to handle, rather than performing any action itself ([BR-MENU-075](../../business-rules.md#br-menu-075-each-toolbar-icon-maps-to-exactly-one-toolbarbutton-value)).

## Purpose
- Render top-level page links from the user's authorised menu items inside the top menu/app row panel, highlighting the current page's link ([BR-MENU-052](../../business-rules.md#br-menu-052-top-page-links-render-inside-the-topmenuapp-row-panel), [BR-MENU-058](../../business-rules.md#br-menu-058-the-current-pages-top-link-is-highlighted)).
- Build the page action toolbar so each icon is a registered `SAIFImageButton`, deriving its visibility from the current page's configuration and applying a client-side one-click guard script to prevent duplicate submits ([BR-MENU-053](../../business-rules.md#br-menu-053-every-toolbar-icon-is-a-registered-saifimagebutton), [BR-MENU-061](../../business-rules.md#br-menu-061-the-one-click-guard-script-is-registered-once-per-page)).
- Raise `ToolbarClick` with the logical `ToolBarButton` that was clicked, leaving the actual action to the hosting page, without re-checking the button's visibility or enabled state at click time ([BR-MENU-077](../../business-rules.md#br-menu-077-toolbar-click-handling-does-not-re-check-visibility-or-enabled-state)).
- Serialize each button's rendered state into `clsMenuButton` instances kept in view state, so state survives postbacks without re-deriving capability flags every time.*

## Context
- Namespace: `SAIF.Presentation.Web.Controls.V2.Menu`
- Assembly/package: `SAIF.Presentation.Web.Controls.V2.Menu` (shipped merged into `SAIF.Presentation.Web.Infragistics111.dll` via ILMerge)

## Public members
| Member | Signature | Purpose |
| --- | --- | --- |
| `ToolbarClick` | `Public Event ToolbarClick(button As ToolBarButton)` | Raised when the user clicks a toolbar icon; carries the logical button identity for the hosting page to act on. |
| `SelectedCategory` | `Public Property SelectedCategory As String` | The menu category currently selected; used to determine which top-row link is highlighted. |
| `HighlightPage` | `Public Property HighlightPage As Boolean` | Whether the current page's top link should be visually highlighted. |
| `EnableButtonIndicators` | `Public Property EnableButtonIndicators As Boolean` | Whether toolbar buttons show the AJAX activity indicator/form-disable behaviour on click. |
| `InsertButton` | `Public Property InsertButton As Boolean` | Explicit override to force-show or force-hide the Insert toolbar button, independent of the derived capability flag. |
| `SaveButton` | `Public Property SaveButton As Boolean` | Explicit override for the Save toolbar button's visibility. |
| `DeleteButton` | `Public Property DeleteButton As Boolean` | Explicit override for the Delete toolbar button's visibility. |
| `EditButton` | `Public Property EditButton As Boolean` | Explicit override for the Edit toolbar button's visibility. |
| `CancelButton` | `Public Property CancelButton As Boolean` | Explicit override for the Cancel toolbar button's visibility. |
| `SubmitButton` | `Public Property SubmitButton As Boolean` | Explicit override for the Submit toolbar button's visibility. |
| `PrintButton` | `Public Property PrintButton As Boolean` | Explicit override for the Print toolbar button's visibility. |
| `PreviewButton` | `Public Property PreviewButton As Boolean` | Explicit override for the Preview toolbar button's visibility. |
| `EmailButton` | `Public Property EmailButton As Boolean` | Explicit override for the Email toolbar button's visibility. |
| `DownloadButton` | `Public Property DownloadButton As Boolean` | Explicit override for the Download toolbar button's visibility. |
| `CalculateButton` | `Public Property CalculateButton As Boolean` | Explicit override for the Calculate toolbar button's visibility. |
| `HelpButton` | `Public Property HelpButton As Boolean` | Explicit override for the Help toolbar button's visibility. |
| `PrefsButton` | `Public Property PrefsButton As Boolean` | Explicit override for the general Preferences toolbar button's visibility. |
| `SetPrefsButton` | `Public Property SetPrefsButton As Boolean` | Explicit override for the "Set as preference" toolbar button's visibility. |
| `ClearPrefsButton` | `Public Property ClearPrefsButton As Boolean` | Explicit override for the "Clear preference" toolbar button's visibility. |
| `MenuButtons` | `Public ReadOnly Property MenuButtons As Collection(Of clsMenuButton)` | The current view-state-backed collection of rendered button state objects, one per toolbar icon. |
| `NavigateToItem` | `Public Sub NavigateToItem(application As String, page As String)` | Locates the sibling `SAIFMenu` control (by the fixed ID `SAIFMenu1`) and forces navigation state to the given application/page. |

## Behavioral notes
- `GetNavigationData` is duplicated verbatim from `SAIFMenu` rather than shared, so the two controls must be kept in sync manually.*
- Toolbar button state (visibility, enabled, image, tooltip, access key) is serialized into `clsMenuButton` instances kept in view state rather than being recomputed on every postback ([BR-MENU-054](../../business-rules.md#br-menu-054-toolbar-button-state-is-serialized-into-view-state)).
- A disabled button renders a `_D` image variant and a disabled control instead of being hidden outright ([BR-MENU-068](../../business-rules.md#br-menu-068-a-disabled-button-renders-a-_d-image-variant-and-a-disabled-control)).
- Rendering exceptions are caught and written directly into the page rather than raised, mirroring `SAIFMenu`'s behaviour ([BR-MENU-071](../../business-rules.md#br-menu-071-rendering-failures-are-reported-in-page-rather-than-raised)).

## Constraints and usage notes
- `NavigateToItem` assumes a sibling control literally named `SAIFMenu1` exists on the page; renaming the `SAIFMenu` instance breaks this integration.**
- Top link IDs are constructed with a fixed `TOP_LB` prefix plus the item's sequence number, so hosting pages must not rely on any other ID scheme when locating them programmatically ([BR-MENU-057](../../business-rules.md#br-menu-057-top-link-ids-are-prefixed-top_lb-plus-the-sequence-number)).
- The hosting page should be castable to `SAIF.Presentation.Web.MVC.ViewPageBase`, matching the same constraint documented for `SAIFMenu` ([BR-MENU-005](../../business-rules.md#br-menu-005-the-hosting-page-must-be-castable-to-viewpagebase)).*

> **Note:** Statements marked with * were inferred from code structure, naming conventions, or contextual evidence where direct confirmation was not available in source artifacts. Statements marked with ** could not be confirmed; treat as unknown until verified.

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