Skip to content

Commit 806146b

Browse files
authored
lift IsAnyDrawerOpen method to class level in DrawerHost (#3837)
1 parent 09e8e31 commit 806146b

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/MaterialDesignThemes.Wpf/DrawerHost.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -586,7 +586,7 @@ private void TemplateContentCoverElementOnPreviewMouseLeftButtonUp(object sender
586586

587587
private void UpdateVisualStates(bool? useTransitions = null)
588588
{
589-
var anyOpen = IsTopDrawerOpen || IsLeftDrawerOpen || IsBottomDrawerOpen || IsRightDrawerOpen;
589+
var anyOpen = IsAnyDrawerOpen();
590590

591591
VisualStateManager.GoToState(this,
592592
!anyOpen ? TemplateAllDrawersAllClosedStateName : TemplateAllDrawersAnyOpenStateName, useTransitions ?? !TransitionAssist.GetDisableTransitions(this));
@@ -661,11 +661,11 @@ private void HandleBackgroundBlur(bool? isOpened = null)
661661
drawerContent.Effect = null;
662662
}
663663
}
664+
}
664665

665-
bool IsAnyDrawerOpen()
666-
{
667-
return IsLeftDrawerOpen || IsTopDrawerOpen || IsRightDrawerOpen || IsBottomDrawerOpen;
668-
}
666+
private bool IsAnyDrawerOpen()
667+
{
668+
return IsLeftDrawerOpen || IsTopDrawerOpen || IsRightDrawerOpen || IsBottomDrawerOpen;
669669
}
670670

671671
private static void RaiseDrawerOpened(DrawerHost drawerHost, Dock dock)

0 commit comments

Comments
 (0)