How to change the image on the ApplicationBar from C#?

前端 未结 3 1525
长情又很酷
长情又很酷 2021-01-21 14:31

I have a small C# project that has an ApplicationBar. But I have a small problem: I want 8 icons on the bar, and the ApplicationBar only supports 4. I came up with a solution (i

3条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-01-21 14:49

    You can't refer to the application buttons by name. Try:

    ((ApplicationBarIconButton)ApplicationBar.Buttons[0]).Remove
    

    I would also suggest that you do not present two groups of 4 icons to the user. The limit is 4 for a reason. Any more than that requires a UI re-think. Perhaps divide the functionality over a few pages?

提交回复
热议问题