I have an application bar in my windows phone application
<phone:PhoneApplicationPage.ApplicationBar>
<shell:ApplicationBar>
<shell:ApplicationBarIconButton x:Name="Refresh" IconUri="Images/appbar.sync.rest.png" Text="Actualiser" Click="ApplicationBarIconButton_Click" />
<shell:ApplicationBarIconButton x:Name="Favorite" IconUri="Images/appbar.favs.addto.rest.png" Text="Favorite" Click="ApplicationBarIconButton_Click_1" />
</shell:ApplicationBar>
</phone:PhoneApplicationPage.ApplicationBar>
I nedd to set the visibility of <shell:ApplicationBarIconButton x:Name="Favorite" IconUri="Images/appbar.favs.addto.rest.png" Text="Favorite" Click="ApplicationBarIconButton_Click_1" /> to false when i click
How can do this??
Best regards
You cannot set visibility of individual buttons in the app bar to collapsed. But you can
enable/disablethem by using theIsEnabledproperty or remove them dynamically from your code behindApplicationBar.Buttons.Remove(object)and pass the button object which you receive on click event. I guess it should work.