using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows; using System.Windows.Controls; using System.Windows.Data; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Imaging; using System.Windows.Navigation; using System.Windows.Shapes; namespace WpfApp2 { /// /// Interaction logic for Factory.xaml /// public partial class Factory : Page { Widget Product = new Widget(); public Factory() { InitializeComponent(); } private void tbxProductName_TextChanged(object sender, TextChangedEventArgs e) { Product.Name = tbxProductName.Text; } private void Color(object sender, RoutedEventArgs e) { var Button = sender as RadioButton; Product.Color = Button.Content.ToString(); } private void btnBuild_Click(object sender, RoutedEventArgs e) { // Launch our Store NavigationService.Navigate(new Store(Product)); } private void btnQuit_Click(object sender, RoutedEventArgs e) { Environment.Exit(0); } } }