protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e)
{
var playButton = ApplicationBar.Buttons[0] as ApplicationBarIconButton;
if (BackgroundAudioPlayer.Instance.PlayerState == PlayState.Playing)
{
playButton.Text = "Stop";
playButton.IconUri = new Uri("/Images/pause.png", UriKind.Relative);
}
else
{
playButton.Text = "Play";
playButton.IconUri = new Uri("/Images/play.png", UriKind.Relative);
}
}