我正在構建我的第一個應用程序在windows phone 7應用程序。我需要在我的應用程序中添加5個應用程序欄圖標。所以我在.xaml.cs文件中寫了一些自定義代碼,就像這樣。如何添加超過4個圖標到應用程序欄og windows phone 7應用程序開發
namespace AAPApplication
{
public partial class AAP : PhoneApplicationPage
{
public AAP()
{
InitializeComponent();
ApplicationBar = new ApplicationBar();
ApplicationBar.Mode = ApplicationBarMode.Default;
ApplicationBar.Opacity = 1.0;
ApplicationBar.IsVisible = true;
ApplicationBar.IsMenuEnabled = true;
ApplicationBarIconButton button1 = new ApplicationBarIconButton();
button1.IconUri = new Uri("/Images/icon_home_deselect.png", UriKind.Relative);
button1.Text = "Home";
ApplicationBar.Buttons.Add(button1);
ApplicationBarIconButton button2 = new ApplicationBarIconButton();
button2.IconUri = new Uri("/Images/icon_event_deselect.png", UriKind.Relative);
button2.Text = "Event";
ApplicationBar.Buttons.Add(button2);
ApplicationBarIconButton button3 = new ApplicationBarIconButton();
button3.IconUri = new Uri("/Images/icon_share_deselect.png", UriKind.Relative);
button3.Text = "Share";
ApplicationBar.Buttons.Add(button3);
ApplicationBarIconButton button4 = new ApplicationBarIconButton();
button4.IconUri = new Uri("/Images/icon_news_deselect.png", UriKind.Relative);
button4.Text = "News";
ApplicationBar.Buttons.Add(button4);
ApplicationBarIconButton button5 = new ApplicationBarIconButton();
button5.IconUri = new Uri("/Images/icon_video_deselect.png", UriKind.Relative);
button5.Text = "Video";
ApplicationBar.Buttons.Add(button5);
}
儘管我正在構建自定義應用欄,但我仍然無法添加第5個圖標。休息工作正常。任何人都可以給我添加第5個圖標的方式
這不是一個自定義的應用程序欄 – bhaku