private async void OnScrolled(object sender, ScrolledEventArgs e) { _cts?.Cancel(); _cts = new CancellationTokenSource(); try { await Task.Delay(500, _cts.Token); _cts.Token.ThrowIfCancellationRequested(); ScrollEnded?.Invoke(this, EventArgs.Empty); } catch { } }
private void OnScrollEnded(object sender, EventArgs e) { ScrollEnded?.Invoke(this, e); }