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
尊重這一點,我永遠不會想到這一點。 –
謝謝,非常有幫助。 –