/// <summary> /// Defines the items in the panelbar /// </summary> /// <param name="addAction">The add action.</param> /// <example> /// <code lang="CS"> /// <%= Html.Kendo().PanelBar() /// .Name("PanelBar") /// .Items(items => /// { /// items.Add().Text("First Item"); /// items.Add().Text("Second Item"); /// }) /// %> /// </code> /// </example> public PanelBarBuilder Items(Action <PanelBarItemFactory> addAction) { var factory = new PanelBarItemFactory(Component, Component.ViewContext); addAction(factory); return(this); }
/// <summary> /// Configures the child items of a <see cref="PanelBarItem"/>. /// </summary> /// <param name="addAction">The add action.</param> /// <example> /// <code lang="CS"> /// <%= Html.Kendo().PanelBar() /// .Name("PanelBar") /// .Items(items => /// { /// items.Add().Text("First Item").Items(firstItemChildren => /// { /// firstItemChildren.Add().Text("Child Item 1"); /// firstItemChildren.Add().Text("Child Item 2"); /// }); /// }) /// %> /// </code> /// </example> public PanelBarItemBuilder Items(Action <PanelBarItemFactory> addAction) { var factory = new PanelBarItemFactory(item, viewContext); addAction(factory); return(this); }