File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -47,12 +47,13 @@ public GraphControl()
47
47
grid . Children . Add ( canvas ) ;
48
48
grid . Children . Add ( layersControl ) ;
49
49
50
- scrollViewer = new ScrollViewer ( )
50
+ scrollViewer = new ScrollViewer
51
51
{
52
52
HorizontalScrollBarVisibility = ScrollBarVisibility . Auto ,
53
- VerticalScrollBarVisibility = ScrollBarVisibility . Auto
53
+ VerticalScrollBarVisibility = ScrollBarVisibility . Auto ,
54
+ Content = grid
54
55
} ;
55
- scrollViewer . Content = grid ;
56
+ scrollViewer . SetValue ( ScrollViewerHelper . ShiftWheelScrollsHorizontallyProperty , true ) ;
56
57
}
57
58
58
59
private bool darkTheme ;
Original file line number Diff line number Diff line change @@ -53,6 +53,9 @@ private static T FindDescendant<T>(this DependencyObject d) where T : Dependency
53
53
if ( d == null )
54
54
return null ;
55
55
56
+ if ( d is T t )
57
+ return t ;
58
+
56
59
var childCount = VisualTreeHelper . GetChildrenCount ( d ) ;
57
60
58
61
for ( var i = 0 ; i < childCount ; i ++ )
You can’t perform that action at this time.
0 commit comments