Skip to content

Toolbar

Concrete ViewComponentBase representing a server-rendered toolbar and its collection of ToolbarItems; currently produces no rendered markup because its WriteHtml override only calls the empty base implementation.

Purpose

  • Concrete ViewComponentBase representing a server-rendered toolbar and its collection of ToolbarItems; currently produces no rendered markup because its WriteHtml override only calls the empty base implementation.

Context

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

Public members

Member Signature Purpose
Toolbar(ViewContext) public Toolbar(ViewContext viewContext) Passes viewContext to the ViewComponentBase constructor and initializes Items to an empty list.
Items public IList<ToolbarItem> Items { get; private set; } The toolbar's configured items, populated via ToolbarItemFactory.Add()/AddSaveButton().

Inherited public members

Members in this section are inherited from ViewComponentBase in SAIF.Framework.Web.Mvc. They are available on this type through inheritance.

Member Signature Purpose Origin
HtmlAttributes public IDictionary<string, object> HtmlAttributes { get; private set; } Attribute dictionary for the rendered component; initialized to an empty RouteValueDictionary in the base constructor. SAIF.Framework.Web.Mvc — ViewComponentBase
Id public string Id { get; set; } Element id for the rendered component. SAIF.Framework.Web.Mvc — ViewComponentBase
Name public string Name { get; set; } Component name, settable via ViewComponentBuilderBase.Name(string). SAIF.Framework.Web.Mvc — ViewComponentBase
ViewContext public ViewContext ViewContext { get; private set; } The MVC view context the component was constructed with. SAIF.Framework.Web.Mvc — ViewComponentBase
Render() public void Render() Wraps the view's Writer in an HtmlTextWriter and calls the (overridable) WriteHtml. SAIF.Framework.Web.Mvc — ViewComponentBase
ToHtmlString() public string ToHtmlString() Calls the (overridable) WriteHtml against a StringWriter and returns the captured output. SAIF.Framework.Web.Mvc — ViewComponentBase

All members above are declared on ViewComponentBase and are inherited unchanged by Toolbar.

Behavioral notes

  • Toolbar overrides the protected WriteHtml(HtmlTextWriter) method to call only base.WriteHtml(writer), whose default implementation is empty, so no markup is currently emitted from Render()/ToHtmlString() regardless of configured items.*
  • A fully configured Toolbar still renders as empty output; this may be abandoned or in-progress work rather than intended behavior.*

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

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