如何在windows phone 8.1中更改共享应用栏的标签 [英] How to change the label of shared App bar in windows phone 8.1

查看:25
本文介绍了如何在windows phone 8.1中更改共享应用栏的标签的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个 Windows Phone 8.1 应用程序.我在页面上使用了共享应用栏.在某些时候,我需要更改全局应用栏的标签或图标.这可能吗?

Im developing an windows phone 8.1 app. I have used shared app bar across the pages. At some point of time, I need to change the label or the icon of the global app bar. Is this possible?

你的想法会有所帮助.

推荐答案

public MainPage()

{this.InitializeComponent();

{ this.InitializeComponent();

Loaded += MainPage_Loaded;
}

void MainPage_Loaded(object sender, RoutedEventArgs e)
{
CommandBar bottomCommandBar = this.BottomAppBar as CommandBar;
AppBarButton appbarButton_0 = bottomCommandBar.PrimaryCommands[0] as AppBarButton;
appbarButton_0.Label = "settings";
appbarButton_0.Icon = new SymbolIcon(Symbol.Setting);
}

这篇关于如何在windows phone 8.1中更改共享应用栏的标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆