/// <summary> /// Creates a list of terms with their associated descriptions. /// </summary> /// <param name="isHorizontal"> /// Make terms and descriptions in the description list line up side-by-side. /// </param> public BootstrapMvcList BeginDescriptionList(bool isHorizontal) { var list = new BootstrapMvcList(Html.ViewContext); list.BeginDescriptionList(isHorizontal); return(list); }
/// <summary> /// Begins a new list tag /// </summary> /// <param name="listType">Type of the desired list.</param> /// <returns> /// </returns> public BootstrapMvcList BeginList(ListType listType) { var list = new BootstrapMvcList(Html.ViewContext); list.BeginList(listType); return(list); }
/// <summary> /// Creates a list with the associated elements. /// </summary> /// <param name="listType">The type of the list.</param> /// <param name="elements">The elements of the list.</param> public MvcHtmlString List(ListType listType, IEnumerable <string> elements) { if (elements == null) { return(null); } var root = BootstrapMvcList.GetRootTagBuilder(listType); foreach (var element in elements) { root.CreateChildTag("li", element); } return(root.ToMvcHtmlString()); }