Nov 15, 2014, 6:50 AM
[CLOSED] Window resize according screen resolution
Hi
I have a window with bellow settings
Controller
Parent View
,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.
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]