示例#1
0
        /// <summary>
        /// Defines the items in the panelbar
        /// </summary>
        /// <param name="addAction">The add action.</param>
        /// <example>
        /// <code lang="CS">
        ///  &lt;%= Html.Kendo().PanelBar()
        ///             .Name("PanelBar")
        ///             .Items(items =>
        ///             {
        ///                 items.Add().Text("First Item");
        ///                 items.Add().Text("Second Item");
        ///             })
        /// %&gt;
        /// </code>
        /// </example>
        public PanelBarBuilder Items(Action <PanelBarItemFactory> addAction)
        {
            var factory = new PanelBarItemFactory(Component, Component.ViewContext);

            addAction(factory);

            return(this);
        }
示例#2
0
        /// <summary>
        /// Configures the child items of a <see cref="PanelBarItem"/>.
        /// </summary>
        /// <param name="addAction">The add action.</param>
        /// <example>
        /// <code lang="CS">
        ///  &lt;%= 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");
        ///                 });
        ///             })
        /// %&gt;
        /// </code>
        /// </example>
        public PanelBarItemBuilder Items(Action <PanelBarItemFactory> addAction)
        {
            var factory = new PanelBarItemFactory(item, viewContext);

            addAction(factory);

            return(this);
        }