internal override void ArrangeChild(
            IControl child,
            Rect rect,
            Size panelSize,
            Orientation orientation)
        {
            if (orientation == Orientation.Vertical)
            {
                rect = new Rect(
                    rect.X - _crossAxisOffset,
                    rect.Y - _pixelOffset,
                    rect.Width,
                    rect.Height);
                child.Arrange(rect);

                if (rect.Y >= _availableSpace.Height)
                {
                    ++_canBeRemoved;
                }

                if (rect.Bottom >= _takenSpace)
                {
                    _takenSpace = rect.Bottom;
                }

                AddToAverageItemSize(rect.Height);
            }
            else
            {
                rect = new Rect(
                    rect.X - _pixelOffset,
                    rect.Y - _crossAxisOffset,
                    rect.Width,
                    rect.Height);
                child.Arrange(rect);

                if (rect.X >= _availableSpace.Width)
                {
                    ++_canBeRemoved;
                }

                if (rect.Right >= _takenSpace)
                {
                    _takenSpace = rect.Right;
                }

                AddToAverageItemSize(rect.Width);
            }
        }
예제 #2
0
 internal virtual void ArrangeChild(
     IControl child,
     Rect rect,
     Size panelSize)
 {
     child.Arrange(rect);
 }
예제 #3
0
 internal virtual void ArrangeChild(
     IControl child,
     Rect rect,
     Size panelSize,
     Orientation orientation)
 {
     child.Arrange(rect);
 }
예제 #4
0
        private void Render(IControl control)
        {
            var ctx = CreateDrawingContext();

            control.Measure(Size.Infinity);
            control.Arrange(new Rect(control.DesiredSize));
            ctx.Render(control);
        }
예제 #5
0
 private void Render(IControl control)
 {
     var ctx = CreateDrawingContext();
     control.Measure(Size.Infinity);
     control.Arrange(new Rect(control.DesiredSize));
     ctx.Render(control);
 }
예제 #6
0
        internal override void ArrangeChild(
            IControl child, 
            Rect rect,
            Size panelSize,
            Orientation orientation)
        {
            if (orientation == Orientation.Vertical)
            {
                rect = new Rect(rect.X, rect.Y - _pixelOffset, rect.Width, rect.Height);
                child.Arrange(rect);

                if (rect.Y >= _availableSpace.Height)
                {
                    ++_canBeRemoved;
                }

                if (rect.Bottom >= _takenSpace)
                {
                    _takenSpace = rect.Bottom;
                }

                AddToAverageItemSize(rect.Height);
            }
            else
            {
                rect = new Rect(rect.X - _pixelOffset, rect.Y, rect.Width, rect.Height);
                child.Arrange(rect);

                if (rect.X >= _availableSpace.Width)
                {
                    ++_canBeRemoved;
                }

                if (rect.Right >= _takenSpace)
                {
                    _takenSpace = rect.Right;
                }

                AddToAverageItemSize(rect.Width);
            }
        }
예제 #7
0
 internal virtual void ArrangeChild(
     IControl child,
     Rect rect,
     Size panelSize,
     Orientation orientation)
 {
     child.Arrange(rect);
 }
예제 #8
0
 public static void Arrange(this IControl control, int width, int height)
 {
     control.Arrange(new Size(width, height));
 }