private void InventoryViewItem_Selected(object sender, RoutedEventArgs e) { CloseMenu_BeginStoryboard.Storyboard.Begin(); InventoryUC inventoryUC = new InventoryUC(); TabItem inventoryTab = new TabItem { Header = "Inventory" }; inventoryTab.Content = inventoryUC; MainTab.Items.Add(inventoryTab); }
public HeroViewModel(Hero hero) { View = new HeroView(); this.Hero = hero; this.View.DataContext = this.Hero; InventoryUC newIventoryUC = new InventoryUC(); newIventoryUC.HorizontalAlignment = System.Windows.HorizontalAlignment.Stretch; newIventoryUC.DataContext = this.Hero; this.View.HeroInfoSP.Children.Add(newIventoryUC); InitEquipView(); }