protected override void OnMouseLeftButtonDown(MouseButtonEventArgs e) { // Set focus to the ScrollViewer to capture key input for scrolling if (!e.Handled && Focus()) { e.Handled = true; } base.OnMouseLeftButtonDown (e); }