/// <summary> /// Updates the combo when changes have happened to the entree /// </summary> private void UpdateCombo() { if (combo != null) { combo.NotifyOfAllPropertyChanges(); } }
/// <summary> /// Sets the flavor of the soda to the flavor /// </summary> /// <param name="sender">The flavor button</param> /// <param name="args"></param> public void FlavorClicked(object sender, RoutedEventArgs args) { if (drink is Sodasaurus soda) { if (sender is FrameworkElement element) { soda.Flavor = (DDFlavor)Enum.Parse(typeof(DDFlavor), element.Tag.ToString()); if (combo != null) { combo.NotifyOfAllPropertyChanges(); } } } NavigationService.GoBack(); }