---
title: ToolbarItemFactory
summary: API reference for ToolbarItemFactory.
status: draft
owner: SAIF Documentation
last_reviewed: 2026-09-17
library: SAIF.Framework.Web.Mvc
reference_type: package
---

# ToolbarItemFactory

Bound to a specific `Toolbar` and view context; creates and appends new `ToolbarItem`s, including a convenience factory for the common "Save" button pattern.

## Purpose
- Bound to a specific `Toolbar` and view context; creates and appends new `ToolbarItem`s, including a convenience factory for the common "Save" button pattern.

## Context
- Namespace: `SAIF.Web.Mvc.UI`
- Assembly/package: `SAIF.Framework.Web.Mvc (source-shipping NuGet package)`
- Kind: class

## Public members
| Member | Signature | Purpose |
| --- | --- | --- |
| ToolbarItemFactory(Toolbar, ViewContext) | `public ToolbarItemFactory(Toolbar toolbar, ViewContext viewContext)` | Stores the target `Toolbar` and view context used by `Add()`/`AddSaveButton()` when creating and appending new items. |
| Add() | `public ToolbarItemBuilder Add()` | Creates an empty `ToolbarItem`, appends it to the bound toolbar's `Items`, and returns its builder. |
| AddSaveButton() | `public ToolbarItemBuilder AddSaveButton()` | Creates a `ToolbarItem` pre-populated with `Id = "lnk-save"`, the save icon URL, and tooltip "Save (Alt + S)" (see [BR-54](../../business-rules.md#br-54-standard-save-button-uses-a-fixed-id%2C-icon%2C-and-tooltip)). |

## Sources
- `src/Web.Mvc/UI/Toolbar/ToolbarItemFactory.cs`
