Apr 06, 2017, 6:47 AM
Responsive extensions & bug fixes (Ext.NET Mobile 4.1.0)
Hi all,
I shared some extensions & bug fixes about responsive on mobile (using Ext.NET Mobile 4.1.0)
https://forums.ext.net/showthread.ph...gives-js-error
https://forums.ext.net/showthread.ph...-layout-change
and i will continue to share on this topic, if there is new ones ,
Container's default setting doesnt apply in responsive, if there is updateDefaults function which sets controls configs, it does
I shared some extensions & bug fixes about responsive on mobile (using Ext.NET Mobile 4.1.0)
https://forums.ext.net/showthread.ph...gives-js-error
https://forums.ext.net/showthread.ph...-layout-change
and i will continue to share on this topic, if there is new ones ,
Container's default setting doesnt apply in responsive, if there is updateDefaults function which sets controls configs, it does
Ext.Container.override({
updateDefaults: function (defaults, oldDefaults) {
var me = this;
var items=[];
if (me.getInnerItems) {
items=me.getInnerItems();
}
else {
items = me.items.items;
}
Ext.each(items, function (item) {
if (item && item.setConfig)
item.setConfig(defaults);
});
},
});
@(
Html.X().Viewport().FitLayout()
.Items(
Html.X().Panel().BoxLayout()
.ResponsiveConfig(rules =>
{
var r = new ResponsiveRule();
r.Rule = "tall";
r.Config.Add(Html.X().Panel().Vertical().Title("tall").DefaultsObject(new { width = "100%" }));
rules.Add(r);
var r2 = new ResponsiveRule();
r2.Rule = "wide";
r2.Config.Add(Html.X().Panel().Horizontal().Title("wide").DefaultsObject(new { width = "50%" }));
rules.Add(r2);
})
.FixResponsivePlugin()
.Items(
Html.X().NumberField().Label("text1"),
Html.X().NumberField().Label("text2")
)
)
)