コード例 #1
0
        private Rectangle GetItemBounds(int index)
        {
            var bounds = InternalChild.Bounds;

            if (Orientation == Orientation.Horizontal)
            {
                return(new Rectangle(bounds.X + InternalChild.GetCellLocationX(index),
                                     bounds.Y,
                                     InternalChild.GetColumnWidth(index),
                                     bounds.Height));
            }

            return(new Rectangle(bounds.X,
                                 bounds.Y + InternalChild.GetCellLocationY(index),
                                 bounds.Width,
                                 InternalChild.GetRowHeight(index)));
        }