private void ShowToastIfNeeded(DeckListViewModel deckListViewModel) { var settings = ApplicationData.Current.LocalSettings; bool isShown; if (settings.Values.ContainsKey("IsEnableNotifciation")) { isShown = (bool)settings.Values["IsEnableNotifciation"]; } else { settings.Values["IsEnableNotifciation"] = true; isShown = true; } if (!isShown) { return; } if (ToastHelper.IsAlreadyShown()) { return; } string message = String.Format("You have {0} new card(s) and {1} due card(s) to review today.", deckListViewModel.TotalNewCards, deckListViewModel.TotalDueCards); var toast = ToastHelper.CreateToast("Review", message); ToastHelper.PopToast(toast); ToastHelper.MarkAlreadyShown(); }