Example #1
0
 private void HoldBunClicked(object sender, RoutedEventArgs args)
 {
     bronto?.HoldBun();
     if (this.combo != null)
     {
         if (this.combo.Entree is Brontowurst wurst)
         {
             wurst.HoldBun();
         }
     }
 }
 public void HoldBun(object sender, RoutedEventArgs e)
 {
     if (DataContext is Order order)
     {
         if (CollectionViewSource.GetDefaultView(order.Items).CurrentItem is DinoDiner.Menu.CretaceousCombo Combo)
         {
             DinoDiner.Menu.Brontowurst b = (DinoDiner.Menu.Brontowurst)Combo.Entree;
             b.HoldBun();
             Combo.Entree = b;
             CollectionViewSource.GetDefaultView(order.Items).Refresh();
         }
     }
 }