Created
October 1, 2017 17:23
-
-
Save nodoid/f813a5dd150b3d05f9a9f833501b76f7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
async Task Scroller(StackLayout layout, ScrollView scroll, int position) | |
{ | |
await Task.Delay(layout.Children.Count * 10).ContinueWith((y) => | |
{ | |
if (y.IsCompleted) | |
{ | |
var selected = layout.Children[position]; | |
Device.BeginInvokeOnMainThread(async () => await scroll.ScrollToAsync((StackLayout)selected, ScrollToPosition.Center, true)); | |
} | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment