Fix for #1666- Back button is not accessible via keyboard when navigating to the about page. (#1679)

* initial changes

* margin

* format

* resolve review comments

* Popup Content Height
This commit is contained in:
Tian L 2021-09-03 16:10:17 +08:00 committed by GitHub
parent 83e3a46374
commit 46497be75c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 79 additions and 77 deletions

View file

@ -154,7 +154,7 @@ namespace CalculatorApp
if(PopupContent != null)
{
PopupContent.Width = e.Size.Width;
PopupContent.Height = e.Size.Height - AppTitleBar.ActualHeight;
PopupContent.Height = e.Size.Height;
}
}
@ -300,7 +300,7 @@ namespace CalculatorApp
var windowBounds = Window.Current.Bounds;
PopupContent.Width = windowBounds.Width;
PopupContent.Height = windowBounds.Height - AppTitleBar.ActualHeight;
PopupContent.Height = windowBounds.Height;
}
}
@ -578,14 +578,9 @@ namespace CalculatorApp
NarratorNotifier.Announce(announcement);
}
private void TitleBarBackButtonClick(object sender, RoutedEventArgs e)
private bool ShouldShowBackButton(bool isAlwaysOnTop, bool isPopupOpen)
{
CloseSettingsPopup();
}
private Visibility ShouldShowBackButton(bool isAlwaysOnTop, bool isPopupOpen)
{
return !isAlwaysOnTop && isPopupOpen ? Visibility.Visible : Visibility.Collapsed;
return !isAlwaysOnTop && isPopupOpen;
}
private double NavigationViewOpenPaneLength(bool isAlwaysOnTop)
@ -593,6 +588,16 @@ namespace CalculatorApp
return isAlwaysOnTop ? 0 : (double)Application.Current.Resources["SplitViewOpenPaneLength"];
}
private GridLength DoubleToGridLength(double value)
{
return new GridLength(value);
}
private void Settings_BackButtonClick(object sender, RoutedEventArgs e)
{
CloseSettingsPopup();
}
private CalculatorApp.Calculator m_calculator;
private GraphingCalculator m_graphingCalculator;
private CalculatorApp.UnitConverter m_converter;