@*   Xafari Framework version : 17.2.3011.1336   *@

@using Xafari.Mvc
@using Xafari.Mvc.Layout

@model MvcLayoutManager

@{
    var orientation = Orientation.Vertical;
    
    // Orientation
    var listEditorViewItem = this.Model.ViewItems[0] as DevExpress.ExpressApp.Editors.ListEditorViewItem;
    if(listEditorViewItem != null && listEditorViewItem.ListEditor.Model.SplitLayout.Direction == DevExpress.ExpressApp.Layout.FlowDirection.Vertical)
    {
        orientation = Orientation.Horizontal;
    }
    //
}

@Html.DevExpress().Splitter(settings =>
{
    settings.Name = this.ViewData.Frame().ControlId("splResizing");
    settings.Width = Unit.Percentage(100);
    settings.Styles.Pane.Paddings.Padding = 0;
    settings.Orientation = orientation;
    settings.FullscreenMode = true;
    settings.Panes.Add(listViewControl =>
    {
        listViewControl.Name = "listViewControl";
        listViewControl.ScrollBars = ScrollBars.Auto;
      
        listViewControl.SetContent(() =>
        {
            ViewContext.Writer.Write("<div class=\"Item ListViewItem\">");
            @Html.Xafari().MvcControl(this.Model.ViewItems[0].Control).Render();
            ViewContext.Writer.Write("</div>");
        });
        
    });

    settings.Panes.Add(detailViewControl =>
    {
        detailViewControl.Name = "detailViewControl";
        detailViewControl.ScrollBars = ScrollBars.Auto;
        
        detailViewControl.SetContentRelativePartialView(Html, "NestedFrameItem/_Partial");
    });
    
}).GetHtml()

