Exemple #1
0
        void LayoutChild(IControl <View> control)
        {
            float controlWidth  = Frame.Width;
            float controlHeight = Frame.Height;

            float width  = _stylesheet.GetHelper <StyleHelper>().Width(control, controlWidth);
            float height = _stylesheet.GetHelper <StyleHelper>().Height(control, controlHeight);

            LayoutBehaviour.InitializeImageContainer(_stylesheet, control, ref width, ref height);

            Bound bound = control.Apply(_stylesheet, new Bound(width, height), new Bound(width, float.PositiveInfinity));

            control.Frame = new Rectangle(0, 0, bound);
        }
Exemple #2
0
        void LayoutChild(IControl <UIView> control)
        {
            StyleHelper style = _stylesheet.GetHelper <StyleHelper> ();

            float parentWidth  = _view.Frame.Width;
            float parentHeight = _view.Frame.Height;

            float w = style.Width(control, parentWidth);
            float h = style.Height(control, parentHeight);

            LayoutBehaviour.InitializeImageContainer(_stylesheet, control, ref w, ref h);

            Bound bound = control.Apply(_stylesheet, new Bound(w, h), new Bound(w, float.MaxValue));

            control.Frame = new Rectangle(0, 0, bound);
        }