【问题标题】:Adding an Appbar in xaml (Universal App)在 xaml 中添加 Appbar(通用应用程序)
【发布时间】:2014-04-07 19:50:02
【问题描述】:

如何使用 Hub 模板将带有按钮的应用栏添加到 Windows Phone 8.1 应用? 我没有看到任何明确的例子来说明如何做到这一点。

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

【问题讨论】:

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


【解决方案1】:

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

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

【讨论】:

  • 跨度>
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2011-04-21
  • 1970-01-01
相关资源
最近更新 更多