Manina.Windows.Forms.ImageListViewLayoutManager.GetCheckBoxBounds C# (CSharp) Метод

GetCheckBoxBounds() публичный Метод

Returns the item checkbox bounds. This method assumes a checkbox icon size of 16x16
public GetCheckBoxBounds ( int itemIndex ) : Rectangle
itemIndex int
Результат System.Drawing.Rectangle
        public Rectangle GetCheckBoxBounds(int itemIndex)
        {
            Rectangle bounds = GetWidgetBounds(GetItemBounds(itemIndex), new Size(16, 16),
                mImageListView.CheckBoxPadding, mImageListView.CheckBoxAlignment);

            // If the checkbox and the icon have the same alignment,
            // move the checkbox horizontally away from the icon
            if (mImageListView.View != View.Details && mImageListView.CheckBoxAlignment == mImageListView.IconAlignment &&
                mImageListView.ShowCheckBoxes && mImageListView.ShowFileIcons)
            {
                ContentAlignment alignment = mImageListView.CheckBoxAlignment;
                if (alignment == ContentAlignment.BottomCenter || alignment == ContentAlignment.MiddleCenter || alignment == ContentAlignment.TopCenter)
                    bounds.X -= 8 + mImageListView.IconPadding.Width / 2;
                else if (alignment == ContentAlignment.BottomRight || alignment == ContentAlignment.MiddleRight || alignment == ContentAlignment.TopRight)
                    bounds.X -= 16 + mImageListView.IconPadding.Width;
            }

            return bounds;
        }