Skip to content

ToolbarItemBuilder

Concrete NavigationItemBuilder<ToolbarItem, ToolbarItemBuilder>; declares its own constructor and otherwise adds no members beyond those inherited from NavigationItemBuilder<TItem, TBuilder>, which supplies all of its fluent setters.

Purpose

  • Concrete NavigationItemBuilder<ToolbarItem, ToolbarItemBuilder>; declares its own constructor and otherwise adds no members beyond those inherited from NavigationItemBuilder<TItem, TBuilder>, which supplies all of its fluent setters.

Context

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

Public members

Member Signature Purpose
ToolbarItemBuilder(ToolbarItem, ViewContext) public ToolbarItemBuilder(ToolbarItem item, ViewContext viewContext) Passes both arguments to the NavigationItemBuilder<ToolbarItem, ToolbarItemBuilder> constructor, wrapping the given ToolbarItem for fluent configuration.

Inherited public members

Members in this section are inherited from NavigationItemBuilder<TItem, TBuilder> in SAIF.Framework.Web.Mvc. They are available on this type through inheritance.

Member Signature Purpose Origin
ViewContext public ViewContext ViewContext { get; set; } Auto-property intended to hold the current MVC view context; not populated by the constructor (the constructor's viewContext parameter is unused), so it is null unless a caller sets it explicitly.* SAIF.Framework.Web.Mvc — NavigationItemBuilder<TItem, TBuilder>
Action(RouteValueDictionary) public ToolbarItemBuilder Action(RouteValueDictionary routeValues) Accepts route values for action-based navigation but does not store them on the item — a no-op overload. SAIF.Framework.Web.Mvc — NavigationItemBuilder<TItem, TBuilder>
Action(string, string) public ToolbarItemBuilder Action(string actionName, string controllerName) Forwards to the three-argument Action(actionName, controllerName, (object)null) overload, which is also a no-op. SAIF.Framework.Web.Mvc — NavigationItemBuilder<TItem, TBuilder>
Action(string, string, object) public ToolbarItemBuilder Action(string actionName, string controllerName, object routeValues) Accepts an action/controller/route-values combination but does not store them on the item — a no-op overload. SAIF.Framework.Web.Mvc — NavigationItemBuilder<TItem, TBuilder>
Action(string, string, RouteValueDictionary) public ToolbarItemBuilder Action(string actionName, string controllerName, RouteValueDictionary routeValues) Accepts an action/controller/route-values combination but does not store them on the item — a no-op overload. SAIF.Framework.Web.Mvc — NavigationItemBuilder<TItem, TBuilder>
Enabled(bool) public ToolbarItemBuilder Enabled(bool value) Sets whether the wrapped item is rendered as clickable/enabled, then returns the builder for chaining. SAIF.Framework.Web.Mvc — NavigationItemBuilder<TItem, TBuilder>
HtmlAttributes(object) public ToolbarItemBuilder HtmlAttributes(object attributes) Converts the anonymous object to a dictionary and merges it into the item's HtmlAttributes, replacing any previous entries, then returns the builder for chaining. SAIF.Framework.Web.Mvc — NavigationItemBuilder<TItem, TBuilder>
HtmlAttributes(IDictionary<string, object>) public ToolbarItemBuilder HtmlAttributes(IDictionary<string, object> attributes) Clears the item's HtmlAttributes and repopulates it with the supplied dictionary, then returns the builder for chaining. SAIF.Framework.Web.Mvc — NavigationItemBuilder<TItem, TBuilder>
Id(string) public ToolbarItemBuilder Id(string value) Sets the DOM identifier assigned to the rendered item, then returns the builder for chaining. SAIF.Framework.Web.Mvc — NavigationItemBuilder<TItem, TBuilder>
ImageHtmlAttributes(object) public ToolbarItemBuilder ImageHtmlAttributes(object attributes) Converts the anonymous object to a dictionary and merges it into the item's ImageHtmlAttributes, replacing any previous entries, then returns the builder for chaining. SAIF.Framework.Web.Mvc — NavigationItemBuilder<TItem, TBuilder>
ImageHtmlAttributes(IDictionary<string, object>) public ToolbarItemBuilder ImageHtmlAttributes(IDictionary<string, object> attributes) Clears the item's ImageHtmlAttributes and repopulates it with the supplied dictionary, then returns the builder for chaining. SAIF.Framework.Web.Mvc — NavigationItemBuilder<TItem, TBuilder>
ImageUrl(string) public ToolbarItemBuilder ImageUrl(string value) Sets the icon/image URL displayed alongside the item's label, then returns the builder for chaining. SAIF.Framework.Web.Mvc — NavigationItemBuilder<TItem, TBuilder>
LinkHtmlAttributes(object) public ToolbarItemBuilder LinkHtmlAttributes(object attributes) Converts the anonymous object to a dictionary and merges it into the item's LinkHtmlAttributes, replacing any previous entries, then returns the builder for chaining. SAIF.Framework.Web.Mvc — NavigationItemBuilder<TItem, TBuilder>
LinkHtmlAttributes(IDictionary<string, object>) public ToolbarItemBuilder LinkHtmlAttributes(IDictionary<string, object> attributes) Clears the item's LinkHtmlAttributes and repopulates it with the supplied dictionary, then returns the builder for chaining. SAIF.Framework.Web.Mvc — NavigationItemBuilder<TItem, TBuilder>
Route(string, object) public ToolbarItemBuilder Route(string routeName, object routeValues) Accepts a named route and route values for navigation but does not store them on the item — a no-op overload. SAIF.Framework.Web.Mvc — NavigationItemBuilder<TItem, TBuilder>
Route(string, RouteValueDictionary) public ToolbarItemBuilder Route(string routeName, RouteValueDictionary routeValues) Accepts a named route and route values for navigation but does not store them on the item — a no-op overload. SAIF.Framework.Web.Mvc — NavigationItemBuilder<TItem, TBuilder>
Text(string) public ToolbarItemBuilder Text(string value) Sets the display label rendered for the item, then returns the builder for chaining. SAIF.Framework.Web.Mvc — NavigationItemBuilder<TItem, TBuilder>
Tooltip(string) public ToolbarItemBuilder Tooltip(string value) Sets the hover text (title attribute) rendered for the item, then returns the builder for chaining. SAIF.Framework.Web.Mvc — NavigationItemBuilder<TItem, TBuilder>
Url(string) public ToolbarItemBuilder Url(string value) Sets the literal navigation URL used instead of action/route-based navigation, then returns the builder for chaining. SAIF.Framework.Web.Mvc — NavigationItemBuilder<TItem, TBuilder>
Visible(bool) public ToolbarItemBuilder Visible(bool value) Sets whether the wrapped item is rendered at all, then returns the builder for chaining. SAIF.Framework.Web.Mvc — NavigationItemBuilder<TItem, TBuilder>

All members above are declared on NavigationItemBuilder<TItem, TBuilder> (constructed here as NavigationItemBuilder<ToolbarItem, ToolbarItemBuilder>) and are inherited unchanged by ToolbarItemBuilder.

Behavioral notes

  • All fluent configuration methods (Id, Text, Tooltip, Url, Enabled, Visible, the html-attribute setters, and the no-op Action/Route) are inherited from NavigationItemBuilder<ToolbarItem, ToolbarItemBuilder>; the table above documents the full inherited surface directly on this page.

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/ToolbarItemBuilder.cs
  • src/Web.Mvc/UI/NavigationItemBuilder.cs