Skip to content

Commit e635245

Browse files
authored
Merge pull request #1048 from xied75/issues-801
[BladeView] proper scroll for Data binding; fixing #801
2 parents 4dcbdb2 + 3a1e59f commit e635245

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
using System.Collections.Generic;
1515
using System.Collections.ObjectModel;
1616
using System.Linq;
17-
using System.Threading.Tasks;
1817
using Windows.Foundation;
1918
using Windows.Foundation.Collections;
2019
using Windows.UI.Core;
@@ -169,6 +168,11 @@ private void ItemsVectorChanged(IObservableVector<object> sender, IVectorChanged
169168
}
170169
}
171170
}
171+
else if (e.CollectionChange == CollectionChange.ItemInserted)
172+
{
173+
UpdateLayout();
174+
GetScrollViewer()?.ChangeView(_scrollViewer.ScrollableWidth, null, null);
175+
}
172176
}
173177
}
174-
}
178+
}

0 commit comments

Comments
 (0)