private void ShowCriteriaDetailsButton_Click(object sender, RoutedEventArgs e)
        {
            // Get which contest is associated with this grid.
            if (CriteriasListView.SelectedItems.Count == 1)
            {
                Criteria criteria = (Criteria)CriteriasListView.SelectedItems[0];


                EditCriteriaContentDialog editCriteriaContentDialog = new EditCriteriaContentDialog(criteria);

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

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

                App.ShowContentDialog(errorMsg, null);
            }
        }
        private void AddCriteriaButton_Click(object sender, RoutedEventArgs e)
        {
            EditCriteriaContentDialog editCriteriaContentDialog = new EditCriteriaContentDialog(null);

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

            App.ShowContentDialog(editCriteriaContentDialog, callback);
        }
        private void CriteriaGrid_DoubleTapped(object sender, DoubleTappedRoutedEventArgs e)
        {
            // Get which contest is associated with this grid.
            if (CriteriasListView.SelectedItems.Count == 1)
            {
                Criteria criteria = (Criteria)CriteriasListView.SelectedItems[0];


                EditCriteriaContentDialog editCriteriaContentDialog = new EditCriteriaContentDialog(criteria);

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

                App.ShowContentDialog(editCriteriaContentDialog, callback);
            }
        }