File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change 2
2
using System . Windows . Controls ;
3
3
using System . Windows . Controls . Primitives ;
4
4
using System . Windows . Input ;
5
+ using System . Windows . Media ;
5
6
using MaterialDesignColors . WpfExample . Domain ;
6
7
using MaterialDesignThemes . Wpf ;
7
8
@@ -19,6 +20,14 @@ public MainWindow()
19
20
20
21
private void UIElement_OnPreviewMouseLeftButtonUp ( object sender , MouseButtonEventArgs e )
21
22
{
23
+ //until we had a StaysOpen glag to Drawer, this will help with scroll bars
24
+ var dependencyObject = Mouse . Captured as DependencyObject ;
25
+ while ( dependencyObject != null )
26
+ {
27
+ if ( dependencyObject is ScrollBar ) return ;
28
+ dependencyObject = VisualTreeHelper . GetParent ( dependencyObject ) ;
29
+ }
30
+
22
31
MenuToggleButton . IsChecked = false ;
23
32
}
24
33
You can’t perform that action at this time.
0 commit comments