private void MusicButtonClicked(object sender, EventArgs e) { if (!_musicScreenVisible) { MusicFlip.Begin(); var aboutButton = (ApplicationBarIconButton)ApplicationBar.Buttons[0]; aboutButton.IsEnabled = false; } else { MusicFlipBack.Begin(); var aboutButton = (ApplicationBarIconButton)ApplicationBar.Buttons[0]; aboutButton.IsEnabled = true; } _musicScreenVisible = !_musicScreenVisible; }
protected override void OnBackKeyPress(System.ComponentModel.CancelEventArgs e) { if (_aboutScreenVisible) { AboutFlipBack.Begin(); _aboutScreenVisible = false; e.Cancel = true; } if (_musicScreenVisible) { MusicFlipBack.Begin(); _musicScreenVisible = false; e.Cancel = true; } foreach (ApplicationBarIconButton button in ApplicationBar.Buttons) { button.IsEnabled = true; } base.OnBackKeyPress(e); }