3
一个有趣的问题是,我想知道是否可以将Windows Phone 8中的应用程序栏按钮设置为使用除当前重音颜色以外的其他颜色作为背景按下按钮。我目前在我的测试应用程序的代码后面创建我的应用程序栏。有什么建议如何做到这一点?我还没有在任何地方找到资源。基本上我现在所拥有的是用于测试目的的非常简单的应用栏。如何在按下时更改应用程序栏按钮的颜色
MainPage.xaml.cs中
private void BuildLocalizedApplicationBar()
{
// Set the page's ApplicationBar to a new instance of ApplicationBar.
ApplicationBar = new ApplicationBar();
// Create a new button and set the text value to the localized string from AppResources.
ApplicationBarIconButton newButton = new ApplicationBarIconButton(new Uri("/Assets/AppBar/new.png", UriKind.Relative));
newButton.Text = "new";
newButton.Click += newButton_Click;
ApplicationBar.Buttons.Add(newButton);
}
有趣,但非常有帮助的。 – Matthew
尊重这一点,我永远不会想到这一点。 –
谢谢,非常有帮助。 –