Skip to content

Commit db521c7

Browse files
committed
fix: refresh Panel layout when size changes
1 parent 46b2708 commit db521c7

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/Uno.UI/UI/Xaml/Controls/ItemsWrapGrid/ItemsWrapGrid.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,16 @@ public partial class ItemsWrapGrid : Panel, IVirtualizingPanel
1919
public int LastCacheIndex => _layout.XamlParent.NativePanel.ViewCache.LastCacheIndex;
2020
#endif
2121

22+
partial void OnItemWidthChangedPartial(double oldItemWidth, double newItemWidth)
23+
{
24+
_layout?.Refresh();
25+
}
26+
27+
partial void OnItemHeightChangedPartial(double oldItemHeight, double newItemHeight)
28+
{
29+
_layout?.Refresh();
30+
}
31+
2232
public ItemsWrapGrid()
2333
{
2434
if (FeatureConfiguration.ListViewBase.DefaultCacheLength.HasValue)

0 commit comments

Comments
 (0)