private void LoginLogoutMenuFlyoutItem_Tapped(object sender, TappedRoutedEventArgs e) { if (IsLoggedIn) { if (LogoutTapped != null) { LogoutTapped(this, e); } if (LogoutCommand.CanExecute(Header)) { LogoutCommand.Execute(Header); } } else { if (LoginTapped != null) { LoginTapped(this, e); } if (LoginCommand.CanExecute(Header)) { LoginCommand.Execute(Header); } } }