Skip to content

Commit

Permalink
fix(NavigationView): toggle pane button width when light-dismissed
Browse files Browse the repository at this point in the history
  • Loading branch information
Xiaoy312 committed Aug 5, 2020
1 parent 6c3df51 commit 21b3bdc
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/Uno.UI/UI/Xaml/Controls/NavigationView/NavigationView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3034,12 +3034,15 @@ void UpdatePaneToggleSize()

if (!m_isClosedCompact && PaneTitle?.Length > 0)
{
if (splitView.DisplayMode == SplitViewDisplayMode.Overlay && IsPaneOpen)
// if splitView.IsPaneOpen changed directly by SplitView,
// the two-way binding haven't sync'd up IsPaneOpen yet.
var isPaneOpen = m_isOpenPaneForInteraction ? IsPaneOpen : splitView.IsPaneOpen;
if (splitView.DisplayMode == SplitViewDisplayMode.Overlay && isPaneOpen)
{
width = OpenPaneLength;
togglePaneButtonWidth = OpenPaneLength - (ShouldShowBackButton() ? c_backButtonWidth : 0);
}
else if (!(splitView.DisplayMode == SplitViewDisplayMode.Overlay && !IsPaneOpen))
else if (!(splitView.DisplayMode == SplitViewDisplayMode.Overlay && !isPaneOpen))
{
width = OpenPaneLength;
togglePaneButtonWidth = OpenPaneLength;
Expand Down

0 comments on commit 21b3bdc

Please sign in to comment.