public async Task UpdatePhotoAsync(CancellationToken token)
{
if (token.IsCancellationRequested)
return;
if (IsLoadedPhoto)
return;
if (String.IsNullOrEmpty(this.UserPrincipalName))
return;
var graph = AuthenticationHelper.GetGraphService();
var tuple = await graph.Me.Photo.GetPhoto(this.UserPrincipalName);
if (tuple != null)
{
this.Photo = tuple.Item1;
this.PhotoUri = tuple.Item2;
}
IsLoadedPhoto = true;
}
public RelayCommand UserCommand