_masterLayout = new MasterDetailContainer(newElement, true, Context)
{
+ TopPadding = ((IMasterDetailPageController)newElement).ShouldShowSplitMode ? statusBarHeight : 0,
LayoutParameters = new LayoutParams(ViewGroup.LayoutParams.WrapContent, ViewGroup.LayoutParams.WrapContent) { Gravity = (int)GravityFlags.Start }
};
double width = Context.FromPixels(right - left);
double height = Context.FromPixels(bottom - top);
double xPos = 0;
+ bool supressPadding = false;
//splitview
if (MasterDetailPageController.ShouldShowSplitMode)
}
else
{
+ //if we are showing the normal popover master doesn't have padding
+ supressPadding = isMasterPage;
//popover make the master smaller
width = isMasterPage && (Device.Info.CurrentOrientation.IsLandscape() || Device.Idiom == TargetIdiom.Tablet) ? DefaultWidthMaster : width;
}
- double padding = Context.FromPixels(TopPadding);
+ double padding = supressPadding ? 0 : Context.FromPixels(TopPadding);
return new Rectangle(xPos, padding, width, height - padding);
}