Exemplo n.º 1
0
        public Size Measure(BoxConstraint constraint)
        {
            var size = constraint
                       .Constrain(Size);

            var childSize = Child.Measure(size);

            return(constraint
                   .Tighten(childSize)
                   .GetMinSize());
        }
Exemplo n.º 2
0
        public Size Draw(Point offset, BoxConstraint constraint, UIContext context)
        {
            var size = constraint
                       .Constrain(Size);

            var childSize = Child.Draw(offset, size, context);

            return(constraint
                   .Tighten(childSize)
                   .GetMinSize());
        }