Example #1
0
        private async void model_PropertyChanged(object sender, PropertyChangedEventArgs e)
        {
            Exception exception = null;

            switch (e.PropertyName)
            {
            case "ObjectId":
                try
                {
                    await model.LoadBoardGameAsync();
                }
                catch (Exception ex)
                {
                    exception = ex;
                }
                finally
                {
                    //ToggleOverlay(false);
                }
                if (exception != null)
                {
                    await ShowToastException("Error loading details", exception);
                }
                break;

            case "BoardGame":
                try
                {
                    RankListSelector.Visibility = model.BoardGame.RankList.Any() ? Visibility.Visible : Visibility.Collapsed;
                    await model.LoadExpansionsAsync();
                }
                catch (Exception ex)
                {
                    exception = ex;
                }
                if (exception != null)
                {
                    await ShowToastException("Error loading expansions", exception);
                }
                break;
            }
        }