private void BackersGridView_OnLoaded(object sender, RoutedEventArgs e) { var scrollbars = MainScrollViewer.GetDescendantsOfType <ScrollBar>().ToList(); var bar = scrollbars.FirstOrDefault(x => x.Orientation == Orientation.Horizontal); if (bar != null) { bar.Scroll += BarScroll; } MainScrollViewer.ViewChanged += MainScrollViewerOnViewChanged; }