protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e)
        {
            Container.Resolve <IMessagePublisher>().Register(this);
            var userId = long.Parse(NavigationManager.GetQueryParameter("id"));

            UserId   = userId;
            IsPinned = PinService.Exists(PinService.GetUserDetailsUri(userId));
        }
 void PinToStart(object sender)
 {
     if (IsPinned)
     {
         PinService.RemoveTile(PinService.GetUserDetailsUri(UserId));
         IsPinned = false;
     }
     else
     {
         PinService.CreateUpdateStartTile(User.name, User.TasksCountText, PinService.GetUserDetailsUri(UserId), true);
         IsPinned = true;
     }
 }
        public async void LoadData(bool isUserAction = false)
        {
            IsBusy = true;
            User   = await new StorageService().Find <AsanaUser>(UserId);

            await LoadTasksFromDb();

            IsBusy = false;

            if (NavigationEventArgs.IsBackOrReset())
            {
                NotifyAll();
                return;
            }

            if (CheckInternetConnection(false))
            {
                AddOperation();



                var tasks = new List <System.Threading.Tasks.Task>();
                foreach (var w in User.GetAvailableWorkspaces())
                {
                    tasks.Add(LoadTasks(w, isUserAction));
                }


                System.Threading.Tasks.Task.Factory.ContinueWhenAll(tasks.ToArray(), x =>
                {
                    User.TasksCount =
                        ActiveTasks.Count;

                    if (IsPinned)
                    {
                        PinService.CreateUpdateStartTileAsync(User.name, User.TasksCountText, PinService.GetUserDetailsUri(UserId), false);
                    }

                    RemoveOperation();
                });
            }
            await OffineSyncTaskService.Execute(this, () => { });
        }