0
我需要关于实施XAML Navigation menu sample的帮助。汉堡按钮重叠SplitView窗格
在我写的代码中,汉堡按钮与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;
};
}
如果您将ListView放置到SplitView.Pane中,它也运行良好,我注意到您在TitleBar上添加了一个后退按钮,您能否向我们展示一些代码片段? –
@Franklin Chen是的,当然。我在窗格中使用了一个简单的ListView。你有关于如何防止汉堡包和面板重叠的想法吗? – Anil
可以从AppShell构造函数调用此方法。 \t \t AppFrame是放置在SplitView的Content属性中的框架 – Anil