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 22using System . Windows . Controls ;
33using System . Windows . Controls . Primitives ;
44using System . Windows . Input ;
5+ using System . Windows . Media ;
56using MaterialDesignColors . WpfExample . Domain ;
67using MaterialDesignThemes . Wpf ;
78
@@ -19,6 +20,14 @@ public MainWindow()
1920
2021 private void UIElement_OnPreviewMouseLeftButtonUp ( object sender , MouseButtonEventArgs e )
2122 {
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+
2231 MenuToggleButton . IsChecked = false ;
2332 }
2433
You can’t perform that action at this time.
0 commit comments