Skip to content

Commit

Permalink
#61 fix bug caused by negative offset
Browse files Browse the repository at this point in the history
  • Loading branch information
sbaeumlisberger committed Jul 10, 2024
1 parent b262c74 commit 3e78d23
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/VirtualizingWrapPanel/VirtualizingWrapPanel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ private Rect GetViewportFromGroupItem(IHierarchicalVirtualizationAndScrollInfo g
if (Orientation == Orientation.Horizontal)
{
viewportY = Math.Max(0, viewportY - groupItem.HeaderDesiredSizes.PixelSize.Height);
double visibleHeaderHeight = Math.Max(0, groupItem.HeaderDesiredSizes.PixelSize.Height - groupItem.Constraints.Viewport.Location.Y);
double visibleHeaderHeight = Math.Max(0, groupItem.HeaderDesiredSizes.PixelSize.Height - Math.Max(0, groupItem.Constraints.Viewport.Location.Y));
viewporteHeight = Math.Max(0, viewporteHeight - visibleHeaderHeight);
}
else
Expand Down
2 changes: 1 addition & 1 deletion src/VirtualizingWrapPanel/VirtualizingWrapPanel.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

<PropertyGroup>
<title>VirtualizingWrapPanel</title>
<Version>2.0.9</Version>
<Version>2.0.10</Version>
<Authors>S. Bäumlisberger</Authors>
<Copyright>© S. Bäumlisberger</Copyright>
<Description>Implementation of a comprehensive VirtualizingWrapPanel for WPF.</Description>
Expand Down

0 comments on commit 3e78d23

Please sign in to comment.