float checkMargin = __pProperty->GetCheckMargin();
FloatRectangle bitmapBounds = __pProperty->GetItemBitmapBounds();
- FloatPoint checkPosition(bitmapBounds.x, bitmapBounds.y);
+ FloatPoint checkPosition(0.0f, 0.0f);
switch (__pProperty->GetCheckBoxPosition())
{
case ICON_LIST_VIEW_CHECK_BOX_POSITION_TOP_LEFT:
__firstDrawnIndex = index;
__firstDrawnItemFullyDrawn = _FloatCompareGE(itemRect.y, 0);
- while (itemRect.y < endYPos)
+ float lastDrawnItemY = 0.0f;
+ int lastIndex = -1;
+ bool isUpdated = false;
+
+ while (itemRect.y < endYPos || index <= __lastDrawnIndex)
{
itemRect.x = __startPosOfAxis;
while (itemRect.x < endXPos && index < itemCount)
itemRect.x += unitWidth;
}
itemRect.y += unitHeight;
+ if (itemRect.y >= endYPos && !isUpdated)
+ {
+ isUpdated = true;
+ lastIndex = index;
+ lastDrawnItemY = itemRect.y;
+ }
}
- __lastDrawnIndex = index - 1;
- __lastDrawnItemFullyDrawn = _FloatCompareGE(endYPos, itemRect.y);
+ __lastDrawnIndex = lastIndex - 1;
+ __lastDrawnItemFullyDrawn = _FloatCompareGE(endYPos, lastDrawnItemY);
// Support Accessibility
__RequestToDrawAccessibilityFocusUi = true;