private async void ExecuteSignOutCommand()
{
Windows.UI.Popups.MessageDialog dialog = new Windows.UI.Popups.MessageDialog(string.Format("Do you want to sign out from {0}?", string.IsNullOrEmpty(PortalService.CurrentPortalService.OrganizationName)? "ArcGIS.com" : PortalService.CurrentPortalService.OrganizationName));
dialog.Commands.Add(new Windows.UI.Popups.UICommand("Sign out", (a) =>
{
// clear all observable collections
ClearAllCollections();
// signal changes on PortalService properties
RaisePropertyChanged(PortalServicePropertyName);
// sign out the current portal connection
Messenger.Default.Send<ChangeSignOutMessage>(new ChangeSignOutMessage() { });
}));
dialog.Commands.Add(new Windows.UI.Popups.UICommand("Cancel", (a) => { }));
await dialog.ShowAsync();
}