我在我的 Windows 手机应用程序中有一个包含 2 个 appbariconbutton 的 applicationBar:
<phone:PhoneApplicationPage.ApplicationBar>
<shell:ApplicationBar IsVisible="True" IsMenuEnabled="True">
<shell:ApplicationBarIconButton x:Name="appbar_button1" IconUri="/Images/appbar_im1_selected.png" Text="im1" Click="appbar_button1_Click" />
<shell:ApplicationBarIconButton x:Name="appbar_button2" IconUri="/Images/appbar_im2.png" Text="im2" Click="appbar_button2_Click" />
</shell:ApplicationBar>
</phone:PhoneApplicationPage.ApplicationBar>
我需要像这样更改 2 appbariconbutton 的 iconUri
private void appbar_button1_Click(object sender, EventArgs e)
{
//Switch the iconuri of appbar_button1 from /Images/appbar_im1_selected.png to /Images/appbar_im1.png
//Switch the iconuri of appbar_button2 from /Images/appbar_im2.png to /Images/appbar_im1_selected.png
}
请问这个怎么做?