From 16ca3fbf4aa8ad28f80a459ce49c14f6cae8778e Mon Sep 17 00:00:00 2001 From: Matthew Rajala Date: Thu, 5 Dec 2024 10:42:41 -0500 Subject: [PATCH] chore: add issue mention --- .../Primitives/CalendarPanel.ModernCollectionBasePanel.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Uno.UI/UI/Xaml/Controls/CalendarView/Primitives/CalendarPanel.ModernCollectionBasePanel.cs b/src/Uno.UI/UI/Xaml/Controls/CalendarView/Primitives/CalendarPanel.ModernCollectionBasePanel.cs index 1fe4bc3120e5..7befaaec8e9f 100644 --- a/src/Uno.UI/UI/Xaml/Controls/CalendarView/Primitives/CalendarPanel.ModernCollectionBasePanel.cs +++ b/src/Uno.UI/UI/Xaml/Controls/CalendarView/Primitives/CalendarPanel.ModernCollectionBasePanel.cs @@ -433,6 +433,9 @@ internal void ScrollItemIntoView(int index, ScrollIntoViewAlignment alignment, d // So here we prepare the _effectiveViewport (which will most probably be re-updated by the ChangeView below), // and then force a base_Measure() +#if HAS_UNO + // Scrolling to the MaxDate and switching between Decade/Year/Month views keeps increasing the _effectiveViewport.Y + // even though there's no more items to show after MaxDate, causing empty rows in the viewport if (newOffset >= sv.ScrollableHeight) { _effectiveViewport.Y = currentOffset; @@ -441,6 +444,9 @@ internal void ScrollItemIntoView(int index, ScrollIntoViewAlignment alignment, d { _effectiveViewport.Y += newOffset - currentOffset; } +#else + _effectiveViewport.Y += newOffset - currentOffset; +#endif sv.ChangeView( horizontalOffset: null,