Exemple #1
0
 public static SplitterBuilder SplitterControl(this HtmlHelper helper, SplitterInformation splitter)
 {
     Action<SplitterPaneFactory> pane=new Action<SplitterPaneFactory>(p =>
     {
         foreach (var item in splitter.Panes)
         {
             if (string.IsNullOrEmpty(item.Value.WidthPanes))
             {
                 item.Value.WidthPanes = "100%";
             }
             if (!string.IsNullOrEmpty(item.Value.ControllerName) || !string.IsNullOrEmpty(item.Value.ActionName))
             {
                 p.Add()
                     .LoadContentFrom(item.Value.ActionName, item.Value.ControllerName)
                     .Collapsible(item.Value.Collapsible)
                     .Scrollable(item.Value.Scrollable)
                     .Size(item.Value.WidthPanes);
             }
             else
             {
                 p.Add()
                     .Content(item.Value.Content)
                     .Collapsible(item.Value.Collapsible)
                     .Scrollable(item.Value.Scrollable)
                     .Size(item.Value.WidthPanes);
             }
         }
     });
     return helper.Kendo().Splitter()
         .Name(splitter.Name)
         .HtmlAttributes(new {style="height:"+splitter.Height+"px;"})
         .Panes(pane);
 }
Exemple #2
0
        public static SplitterBuilder SplitterControl(this HtmlHelper helper, SplitterInformation splitter)
        {
            Action <SplitterPaneFactory> pane = new Action <SplitterPaneFactory>(p =>
            {
                foreach (var item in splitter.Panes)
                {
                    if (string.IsNullOrEmpty(item.Value.WidthPanes))
                    {
                        item.Value.WidthPanes = "100%";
                    }
                    if (!string.IsNullOrEmpty(item.Value.ControllerName) || !string.IsNullOrEmpty(item.Value.ActionName))
                    {
                        p.Add()
                        .LoadContentFrom(item.Value.ActionName, item.Value.ControllerName)
                        .Collapsible(item.Value.Collapsible)
                        .Scrollable(item.Value.Scrollable)
                        .Size(item.Value.WidthPanes);
                    }
                    else
                    {
                        p.Add()
                        .Content(item.Value.Content)
                        .Collapsible(item.Value.Collapsible)
                        .Scrollable(item.Value.Scrollable)
                        .Size(item.Value.WidthPanes);
                    }
                }
            });

            return(helper.Kendo().Splitter()
                   .Name(splitter.Name)
                   .HtmlAttributes(new { style = "height:" + splitter.Height + "px;" })
                   .Panes(pane));
        }