Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions src/GitHub.VisualStudio.UI/UI/Views/GitHubConnectContent.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
using GitHub.Services;
using GitHub.Models;
using System;
using System.Windows.Input;

namespace GitHub.VisualStudio.UI.Views
{
Expand All @@ -16,8 +17,33 @@ public GitHubConnectContent()
InitializeComponent();

DataContextChanged += (s, e) => ViewModel = e.NewValue as IGitHubConnectSection;
repositories.PreviewMouseWheel += Repositories_PreviewMouseWheel;
}

void Repositories_PreviewMouseWheel(object sender, MouseWheelEventArgs e)
{
try
{
if (!e.Handled)
{
var uIElement = base.Parent as UIElement;

if (uIElement != null)
{
e.Handled = true;
uIElement.RaiseEvent(new MouseWheelEventArgs(e.MouseDevice, e.Timestamp, e.Delta)
{
RoutedEvent = UIElement.MouseWheelEvent,
Source = this
});
}
}
}
catch
{
// TODO: Add trace logging: event handler called - who knows what can happen!
}
}
void cloneLink_Click(object sender, RoutedEventArgs e)
{
cloneLink.IsEnabled = false;
Expand Down