private IBound ApplyChild(IStyleSheet stylesheet) { IControlsContext context = ControlsContext.Current; RectangleF app = UIScreen.MainScreen.ApplicationFrame; IBound bound = StyleSheetContext.Current.CreateBound(app.Width, app.Height); Control child = GetChild(); if (child != null) { context.CreateLayoutBehaviour(stylesheet, this).Screen(child, bound); IRectangle old = child.Frame; child.Frame = context.CreateRectangle(old.Left + app.Left, old.Top + app.Top, old.Width, old.Height); } return(bound); }
public static void Init(IControlsContext context) { Current = context; }