/// <summary>
 /// Initializes a new instance of the <see cref="NavBarHelper" /> class.
 /// </summary>
 /// <param name="helper">The helper.</param>
 /// <param name="menuList">The menu list.</param>
 /// <param name="position">The position.</param>
 public NavBarHelper(HtmlHelper helper, IEnumerable <MenuItem> menuList, BrandPosition brandPosition, NavBarDisplay displayType, NavBarPosition navbarPosition, object htmlAttributes)
 {
     this.helper         = helper;
     this.menuList       = menuList;
     this.brandPosition  = brandPosition;
     this.navbarPosition = navbarPosition;
     this.htmlAttributes = htmlAttributes;
     this.displayType    = displayType;
 }
Exemplo n.º 2
0
        /// <summary>
        /// Renders a Twitter Bootstrap NavBar component.
        /// </summary>
        /// <param name="helper">The HTML helper.</param>
        /// <param name="menuList">The menu list.</param>
        /// <param name="brandPosition">The brand position.</param>
        /// <param name="navbarPosition"> </param>
        /// <param name="htmlAttributes">The HTML attributes.</param>
        /// <param name="displayType"> </param>
        /// <returns></returns>
        public static MvcHtmlString NavBar(this HtmlHelper helper, IEnumerable <MenuItem> menuList,
                                           BrandPosition brandPosition   = BrandPosition.None,
                                           NavBarDisplay displayType     = NavBarDisplay.Normal,
                                           NavBarPosition navbarPosition = NavBarPosition.Default,
                                           object htmlAttributes         = null)
        {
            var navBar = new NavBarHelper(helper, menuList, brandPosition, displayType, navbarPosition, htmlAttributes);

            return(MvcHtmlString.Create(navBar.Render()));
        }
Exemplo n.º 3
0
 /// <summary>
 /// Renders a Twitter Bootstrap NavBar component.
 /// </summary>
 /// <param name="helper">The HTML helper.</param>
 /// <param name="menuList">The menu list.</param>
 /// <param name="brandPosition">The brand position.</param>
 /// <param name="htmlAttributes">The HTML attributes.</param>
 /// <returns></returns>
 public static MvcHtmlString NavBar(this HtmlHelper helper, IEnumerable<MenuItem> menuList, BrandPosition brandPosition=BrandPosition.None, NavBarDisplay displayType=NavBarDisplay.Normal, NavBarPosition navbarPosition=NavBarPosition.Default, object htmlAttributes=null)
 {
     var navBar = new NavBarHelper(helper, menuList, brandPosition, displayType, navbarPosition, htmlAttributes);
     return new MvcHtmlString(navBar.Render());
 }