public Card() { merchendise = (MerchendiseWindowViewModel)Application.Current.Resources["MerchendiseWindowViewModel"]; CardViewModel cardViewModel = new CardViewModel(); this.DataContext = cardViewModel; InitializeComponent(); }
public Card(MerchendiseWindowViewModel merchendiseWindow) { merchendise = merchendiseWindow; merchendiseWindow.AddItem = this; CardViewModel cardViewModel = new CardViewModel(merchendiseWindow); this.DataContext = cardViewModel; InitializeComponent(); }