Skip to content

Commit 8a77b2b

Browse files
Morten NielsenMorten Nielsen
authored andcommitted
Minor code doc / cleanup
1 parent 07a1165 commit 8a77b2b

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Microsoft.Toolkit.Uwp.UI.Controls/AdaptiveGridView/AdaptiveGridView.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,13 @@ private void RecalculateLayout(double containerWidth)
5050

5151
_columns = CalculateColumns(containerWidth, DesiredWidth);
5252

53-
// If there's less items than there's columns,
54-
// reduce the column count;
53+
// If there's less items than there's columns, reduce the column count;
5554
if (_listView != null && _listView.Items != null
5655
&& _listView.Items.Count > 0 && _listView.Items.Count < _columns)
5756
{
5857
_columns = _listView.Items.Count;
5958
}
59+
6060
ItemWidth = (containerWidth / _columns) - 5;
6161
}
6262

@@ -92,7 +92,8 @@ private void ListViewItems_VectorChanged(Windows.Foundation.Collections.IObserva
9292
{
9393
if (_listView != null && !double.IsNaN(_listView.ActualWidth))
9494
{
95-
// If the items count changes, check if more or less columns needs to be rendered, in case we were hitting a min-limit.
95+
// If the item count changes, check if more or less columns needs to be rendered,
96+
// in case we were having fewer items than columns.
9697
RecalculateLayout(_listView.ActualWidth);
9798
}
9899
}

0 commit comments

Comments
 (0)