Skip to content

ToolbarItemFactory

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

Purpose

  • Bound to a specific Toolbar and view context; creates and appends new ToolbarItems, 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).

Sources

  • src/Web.Mvc/UI/Toolbar/ToolbarItemFactory.cs