private void ShowUserDetailsButton_Click(object sender, RoutedEventArgs e)
        {
            // Get which contest is associated with this grid.
            if (UsersListView.SelectedItems.Count == 1)
            {
                User user = (User)UsersListView.SelectedItems[0];

                EditUserContentDialog editUserContentDialog = new EditUserContentDialog(user);

                // Create callback to be called when ContentDialog closes.
                Action <ContentDialogResult> callback = async(result) =>
                {
                    await RefreshUsers();
                };

                App.ShowContentDialog(editUserContentDialog, callback);
            }
            else
            {
                ContentDialog errorMsg = new ContentDialog
                {
                    Title           = "Error",
                    Content         = "You must select a user to view it's details!",
                    CloseButtonText = "OK"
                };

                App.ShowContentDialog(errorMsg, null);
            }
        }
        private void AddUserButton_Click(object sender, RoutedEventArgs e)
        {
            EditUserContentDialog editUserContentDialog = new EditUserContentDialog(null);

            // Create callback to be called when ContentDialog closes.
            Action <ContentDialogResult> callback = async(result) =>
            {
                await RefreshUsers();
            };

            App.ShowContentDialog(editUserContentDialog, callback);
        }
        private void UserGrid_DoubleTapped(object sender, DoubleTappedRoutedEventArgs e)
        {
            // Get which contest is associated with this grid.
            if (UsersListView.SelectedItems.Count == 1)
            {
                User user = (User)UsersListView.SelectedItems[0];

                EditUserContentDialog editUserContentDialog = new EditUserContentDialog(user);

                // Create callback to be called when ContentDialog closes.
                Action <ContentDialogResult> callback = async(result) =>
                {
                    await RefreshUsers();
                };

                App.ShowContentDialog(editUserContentDialog, callback);
            }
        }