[CLOSED] [RAZOR] Using viewport to make panel fit available browser window

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1

    [CLOSED] [RAZOR] Using viewport to make panel fit available browser window

    Hi

    I'm trying to layout my application so the panels resize dynamically based on the size of the browser window. I've tried to use the ViewPort (with LayoutType.Fit) to encapsulate my controls, however this caused the Panel the take up the complete browser window.

    _Layout.chstml (Displays components from _Control1.cshtml and index.cshtml)

    ...
    <div id="search">           
     @Html.Partial("_Control1") --> _Control1.cshtml
    </div>
    <div id="main">
     @RenderBody() --> index.cshtml
    </div>
    ...
    _Control1.cshtml
    Html.X().ViewPort()
     .Layout(LayoutType.Fit)
     .Items(items =>
      items.Add(Html.X().FormPanel()
        .ID("formPanel")
        .Title("formPanel")
        .Collapsible(true)
        .Layout(LayoutType.HBox)
        .Items(items =>
        {
            items.Add(Html.X().Panel()
              .ID("catePanel")
              .Title("Date")
              .Closable(true)
              .CloseAction(CloseAction.Hide)
               ...
    index.cshtml

    <h2>@ViewBag.Title</h2>
    @(
    Html.X().ViewPort()
     .Layout(LayoutType.Fit)
     .Items(items =>
      items.Add(Html.X().TabPanel()    
        .ID("TabPanel")
        .Title("TabPanel")
        .Add(Html.X().Panel()
                .ID("Summary")
                .Title("Summary")
                .Split(true)
                .Layout(Ext.Net.LayoutType.Accordion)
                .Add(Html.X().Panel()
                    .ID("InnerSummaryPanel")
                    .Title("Inner Summary")
                    .Layout(Ext.Net.LayoutType.Fit)
                    .Add(Html.X().GridPanel(
                    ...
    Last edited by Daniil; Jun 26, 2012 at 9:22 PM. Reason: [CLOSED]

Similar Threads

  1. [CLOSED] [Razor] Setup Auto load panel in razor
    By UnifyEducation in forum 2.x Legacy Premium Help
    Replies: 1
    Last Post: Apr 27, 2012, 10:54 AM
  2. [CLOSED] Problem with Gridpanel and Viewport on browser resize
    By John_Writers in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: May 10, 2011, 10:44 AM
  3. [CLOSED] Preventing a window moved with header outside browser window
    By CarWise in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Sep 22, 2010, 12:17 PM
  4. Replies: 11
    Last Post: Apr 08, 2010, 1:36 PM
  5. Replies: 4
    Last Post: Feb 23, 2010, 7:38 AM

Tags for this Thread

Posting Permissions