This repository was archived by the owner on Jun 21, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed
src/GitHub.VisualStudio.UI/UI/Views Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change 66using GitHub . Services ;
77using GitHub . Models ;
88using System ;
9+ using System . Windows . Input ;
910
1011namespace GitHub . VisualStudio . UI . Views
1112{
@@ -16,8 +17,33 @@ public GitHubConnectContent()
1617 InitializeComponent ( ) ;
1718
1819 DataContextChanged += ( s , e ) => ViewModel = e . NewValue as IGitHubConnectSection ;
20+ repositories . PreviewMouseWheel += Repositories_PreviewMouseWheel ;
1921 }
2022
23+ void Repositories_PreviewMouseWheel ( object sender , MouseWheelEventArgs e )
24+ {
25+ try
26+ {
27+ if ( ! e . Handled )
28+ {
29+ var uIElement = base . Parent as UIElement ;
30+
31+ if ( uIElement != null )
32+ {
33+ e . Handled = true ;
34+ uIElement . RaiseEvent ( new MouseWheelEventArgs ( e . MouseDevice , e . Timestamp , e . Delta )
35+ {
36+ RoutedEvent = UIElement . MouseWheelEvent ,
37+ Source = this
38+ } ) ;
39+ }
40+ }
41+ }
42+ catch
43+ {
44+ // TODO: Add trace logging: event handler called - who knows what can happen!
45+ }
46+ }
2147 void cloneLink_Click ( object sender , RoutedEventArgs e )
2248 {
2349 cloneLink . IsEnabled = false ;
You can’t perform that action at this time.
0 commit comments