[CLOSED] Window resize according screen resolution

  1. #1

    [CLOSED] Window resize according screen resolution

    Hi
    I have a window with bellow settings
    Controller
    public class windowresizeController : Controller
        {
            //
            // GET: /windowresize/
    
            public ActionResult Index()
            {
                return View();
            }
            public ActionResult chield()
            {
                return View();
            }
        }

    Parent View

    @{
           var X = Html.X();
        
    }
    @X.ResourceManager() 
        @(
     Html.X().Viewport()
     .Layout(LayoutType.Border)
                 .Border(false)
                .Items(
     
                                    X.Panel().Layout(LayoutType.HBox)
                                    .Border(false)
                                    .Height(50)
                                    .Region(Region.North)
                                    .BodyStyle("background: #DFE8F6").AutoScroll(false)
                                    .Items
                                    (
                                    X.Image()
                         
                                    .Height(40)
                                    .Width(300).ImageUrl("")
                                    ,
                                    /*=================================================================*/
     
     
                                    X.DisplayField().Padding(10).Margins("0 0 0 0"),
                                    X.Container().Layout(LayoutType.VBox).Padding(0).Margins("0 0 0 0").Items(
     
                                    )
     
                                    /*====================================================================*/
                                    )
                      ,
     
                        Html.X().TreePanel()
                         
                        .Split(true)
                        .Collapsible(true)
                        .ID("TreePanel")
                        .Region(Region.West)
                        .UseArrows(true)
                        .Width(300)
                        .Title("Menu")
                        .RootVisible(false)
                          ,
                    Html.X().TabPanel()
                    .ID("TabPanel1")
                        .Region(Region.Center)
                        .Border(false)
                        .Items
                        (
                                    Html.X().TabPanel()
                                    .ID("TabPanel")
                                    .Layout(LayoutType.Absolute)
                                    .Border(false)
                                    .Plugins(plugins => plugins.Add(new TabCloseMenu()))
                                    .Items
                                    (
                                                X.Panel()
                                                .ID("pdashboard")
                                                .Title("Dash Board")
                                                .BodyPadding(6)
                                                .AutoScroll(true)
     
                                                .Loader(X.ComponentLoader()
                                                .Url(Url.Action("chield"))
                                             
                                                .LoadMask(m => m.ShowMask = true)
                             
                                                .Mode(LoadMode.Frame)
                                                )
                                    )
                          
                        )
                        .Plugins(plugins => plugins.Add(new TabCloseMenu()))
                        ,
                         X.Panel().ID("pbottom")
     
                        .BodyPadding(0)
                        .AutoScroll(false)
                        .Region(Region.South)
                            .BottomBar(
                              X.StatusBar().StatusAlign(StatusAlign.Right).Border(false)
                                    .Items(
                                        X.ToolbarTextItem().Text("Test"),
                                         X.ToolbarTextItem().ID("txttime"), 
                                          X.ToolbarTextItem()
     
                                    )
                            ).AlignTo("pbottom", "Left")
     
        )
     
     
        )
    Child View
    @{
        var X = Html.X();
    }
    @X.ResourceManager()
        @(Html.X().Viewport()
         .Layout(LayoutType.Fit)
                  .Border(false)
                        .Items(
               
              X.Window()
      .ID("Window1")
      
      .Title("Unused Material")
      .Layout(LayoutType.Fit)
      .BodyStyle("background-color: #F1F1F1;")
       .Width(500)
      .Resizable(true)
      
      .ButtonAlign(Alignment.Right)
      .Modal(true)
      .X(0)
      .Y(0)
      .Items
      (
      X.Panel().ID("GRID")
      )
          
                    )
                   
     
                    )
    may be you will get a error ,ignore this.

    ,and the window contains a grid panel in it.I need the window in child view resized automatically .here I set a fix width to the window but I need the width dynamically according screen resolution.
    Last edited by Daniil; Nov 25, 2014 at 3:07 PM. Reason: [CLOSED]
  2. #2
    Hi @matrixwebtech,

    I would recommend you this setting for the Window.
    .Maximized(true)

Similar Threads

  1. [CLOSED] Fields not showing properly in different screen resolution
    By matrixwebtech in forum 2.x Legacy Premium Help
    Replies: 9
    Last Post: Aug 19, 2014, 3:23 AM
  2. Replies: 2
    Last Post: May 07, 2014, 6:51 AM
  3. [CLOSED] Resize Content from Loader after Resize Window Container
    By Ujvari in forum 2.x Legacy Premium Help
    Replies: 1
    Last Post: Mar 27, 2014, 7:58 PM
  4. [CLOSED] how to adapt the application to the screen resolution
    By JCarlosF in forum 2.x Legacy Premium Help
    Replies: 3
    Last Post: Jun 20, 2013, 12:27 AM
  5. Loading screen during window resize
    By adipoaca in forum 1.x Help
    Replies: 1
    Last Post: Nov 24, 2011, 12:39 PM

Posting Permissions