Jun 17, 2016, 10:46 AM
ViewPort in _Layout (RAZOR)
Hi,
I have in my _Layout.cshtml a viewPort like this:
I have two problems with my index.cshtml:
1. If my navigator window is of 1000px (for example), the grid width is 1000px instead of 800px (becase left panel is 200px). I want that my panel width was 800px and
2. When i callpse the left panel, my grid of the index is moved to the left side (that is correct), the problem is that the right side of the grid is empty... in other word, my grid is not anchored to the right side of the navigator.
I am trying to trial many ways to achieve that effect but without good results Can anyone give me any idea?
thanks in advance.
I have in my _Layout.cshtml a viewPort like this:
@(X.Viewport()
.StyleSpec("background-color: transparent;float:left")
.Layout(LayoutType.Border)
.Items(
X.Panel()
.Title("North")
.Region(Region.North),
X.Panel()
.Title("West")
.Region(Region.West)
.Layout(LayoutType.Accordion)
.Split(true)
.Collapsible(true),
X.Panel()
.Title("Center")
.Region(Region.Center)
.Content(
@<div id="center" style="">
@RenderBody()
</div>
)
)
)
How you can see, I call @RenderBody() inside CENTER PANEL, and my west panel is collapsible. I have an index.cshtml and his layout is that _Layout.cshtml and inside the index there is a GRID I have two problems with my index.cshtml:
1. If my navigator window is of 1000px (for example), the grid width is 1000px instead of 800px (becase left panel is 200px). I want that my panel width was 800px and
2. When i callpse the left panel, my grid of the index is moved to the left side (that is correct), the problem is that the right side of the grid is empty... in other word, my grid is not anchored to the right side of the navigator.
I am trying to trial many ways to achieve that effect but without good results Can anyone give me any idea?
thanks in advance.