public AddArmTypeWindow(ARM_TYPE armType) { InitializeComponent(); DataContext = new AddArmTypeWindowViewModel(armType); TextUpdated += ((AddArmTypeWindowViewModel)DataContext).TextUpdated; ((AddArmTypeWindowViewModel)DataContext).closeWindow += WindowClose; }
public AddArmTypeWindowViewModel(ARM_TYPE armType) { this.armType = armType; if (!String.IsNullOrEmpty(armType.AT_NAME)) { name = armType.AT_NAME; } }