/// <summary> /// Click event changing the screen to the user control that was cliked on /// </summary> /// <param name="sender">needed for click event</param> /// <param name="e">needed for click event</param> void Milk(Object sender, RoutedEventArgs e) { var mm = new MarkarthMilkUC(b, ord, co, sb); mm.DataContext = new MarkarthMilk(); b.Child = mm; ord.order.Add((IOrderItem)mm.DataContext); }
/// <summary> /// Click event changing the screen to the user control that was cliked on /// </summary> /// <param name="sender">needed for click event</param> /// <param name="e">needed for click event</param> void Milk(Object sender, RoutedEventArgs e) { var mm = new MarkarthMilkUC(b, o, co, sb); mm.DataContext = new MarkarthMilk(); b.Child = mm; com.Drink = (Drink)(mm.DataContext); o.order.Add(com); }