Browse Source

fix item repeater page crash

pull/7435/head
Emmanuel Hansen 5 years ago
parent
commit
ef5851f123
  1. 2
      samples/ControlCatalog/Pages/ItemsRepeaterPage.xaml.cs

2
samples/ControlCatalog/Pages/ItemsRepeaterPage.xaml.cs

@ -111,7 +111,7 @@ namespace ControlCatalog.Pages
private void ScrollTo(int index)
{
System.Diagnostics.Debug.WriteLine("Scroll to " + index);
var layoutManager = ((Window)this.GetVisualRoot()).LayoutManager;
var layoutManager = ((TopLevel)VisualRoot).LayoutManager;
var element = _repeater.GetOrCreateElement(index);
layoutManager.ExecuteLayoutPass();
element.BringIntoView();

Loading…
Cancel
Save