// Buttons private void ListViewMenu_SelectionChanged_1(object sender, SelectionChangedEventArgs e) { UserControl usc = null; mainSubColumn.Children.Clear(); switch (((ListViewItem)((ListView)sender).SelectedItem).Name) { case "stStocks": usc = new usc_parent_overviews(); mainSubColumn.Children.Add(usc); break; case "stAddItem": usc = new usc_parent_add_item(); mainSubColumn.Children.Add(usc); break; case "stItemReq": usc = new usc_parent_request(); mainSubColumn.Children.Add(usc); break; case "stRestock": usc = new usc_parent_restock(); mainSubColumn.Children.Add(usc); break; } }
// Cancel Button private void submitCancel_Click(object sender, RoutedEventArgs e) { usc_inventory ui = new usc_inventory(); usc_parent_overviews upo = new usc_parent_overviews(); ui.mainSubColumn.Children.Add(upo); }
public usc_inventory() { InitializeComponent(); usc_parent_overviews upo = new usc_parent_overviews(); mainSubColumn.Children.Add(upo); }