xaml - 在 xaml 中添加 Appbar(通用应用程序)

标签 xaml windows-phone-8 windows-phone-8.1 win-universal-app

如何使用 Hub 模板将带有按钮的应用栏添加到 Windows Phone 8.1 应用程序? 我没有看到任何关于如何执行此操作的明确示例。

具体来说,我想使用 Hub 模板将应用栏菜单项添加到 ItemsPage.xaml。

最佳答案

在 Windows Phone 8.1 项目中,您必须使用 CommandBar API。

看看on this guide,它适用于 Windows 8.1,但语法完全相同。请注意,您必须仅使用 BottomAppBar,其中 PrimaryCommands 显示为我们所知的标准 AppBar 按钮,SecondaryCommands 显示为菜单项。

关于xaml - 在 xaml 中添加 Appbar(通用应用程序),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22921702/

相关文章:

wpf - 在 ComboBoxItem 中设置文本颜色

c# - Windows Phone 获取键盘高度

windows-phone-8 - Windows Phone 8 - 展开/折叠 map 控件

cordova - jquery mobile位置固定在Windows Phone 8和视口(viewport)高度

c# - 如何以最简单的方式在其他手机上安装Windows Phone 8.1应用程序?

windows-phone-8 - Windows Phone 8.1 WebView 中的消息对话框 "Search for app in the Store?"是什么

visual-studio - 如何在 Visual Studio 的 C++/WinRT 中添加新的 XAML "Page"及其关联的代码隐藏文件?

c# - 使用一个 DependencyProperty 在 UserControl 中绑定(bind)具有多个属性的模型

c# - 将绑定(bind)分配给附加属性以隐藏 GridViewColumn

event-handling - 恢复应用程序 Windows Phone