protected override void OnNavigatedTo(NavigationEventArgs e) { _tasks = _tasks = TaskDB.GetAssignedTasks(App.CurrentUser); count = 0; _initialTasks.Clear(); if (EditTaskPage._tasks.Count != 0) { NoTasks.Visibility = Visibility.Collapsed; EditTaskPage.AddItems(); TasksList.ItemsSource = _initialTasks; TasksList.SelectedIndex = 0; TasksList.Visibility = Visibility.Visible; EditView.Visibility = Visibility.Visible; } else { NoTasks.Visibility = Visibility.Visible; TasksList.Visibility = Visibility.Collapsed; EditView.Visibility = Visibility.Collapsed; } }