我需要有关实施XAML 导航菜单示例的帮助。
在我编写的代码中,Hamburger 按钮与 SplitView 窗格重叠。
PS注意:为了保持应用程序简单。我使用了一个简单的 ListView(而不是键盘支持示例中所示的自定义 ListView)。
标题栏后退按钮的代码:
private void backButtonLogic() //Method related to back button
{
//Make titlebar's back button visible
SystemNavigationManager.GetForCurrentView().AppViewBackButtonVisibility =
AppViewBackButtonVisibility.Visible;
//Back button handler
SystemNavigationManager.GetForCurrentView().BackRequested += (s,e) =>
{
bool handled = e.Handled;
if (AppFrame.CanGoBack && !handled)
{
handled = true;
AppFrame.GoBack();
}
e.Handled = handled;
};
//Mobile hardware back button handler
if (ApiInformation.IsTypePresent("Windows.Phone.UI.Input.HardwareButtons"))
Windows.Phone.UI.Input.HardwareButtons.BackPressed += (s, e) =>
{
bool handled = e.Handled;
if (AppFrame.CanGoBack && !handled)
{
handled = true;
AppFrame.GoBack();
}
e.Handled = handled;
};
}