Navigation.PushAsync(new MainPage(), true);
|
protected override void OnSizeAllocated(double width, double height)
{
base.OnSizeAllocated(width, height);
if (width > 0 && pagewith != width)
{
double size = 0;
if (Device.OS == TargetPlatform.iOS && Device.Idiom == TargetIdiom.Tablet)
{
size = Application.Current.MainPage.Width / 300;
}
else
size = Application.Current.MainPage.Width / 250;
var sdf = size.ToString().Split('.')[0];
size = Convert.ToInt32(sdf);
GridLayout gl = new GridLayout();
GridLayout g2 = new GridLayout();
GridLayout g3 = new GridLayout();
gl.SpanCount = (int)size;
list1.LayoutManager = gl;
g2.SpanCount = (int)size;
list2.LayoutManager = g2;
g3.SpanCount = (int)size;
list3.LayoutManager = g3;
}
} |