/// <summary> /// Initializes a new instance of the <see cref="ZipCodeAddBehavior"/> class. /// </summary> public ZipCodeAddBehavior() : base((s, e) => { ManipulatorViewModel viewModel = new ManipulatorViewModel(new ZipCodeInfo(), false); ManipulatorView addView = new ManipulatorView(viewModel); addView.Owner = Application.Current.MainWindow; if ((bool)addView.ShowDialog()) { return(viewModel.ZipInfo); } return(null); }) { }
public ManipulatorView(ManipulatorViewModel zipCodeEditorModel) { InitializeComponent(); this.DataContext = zipCodeEditorModel; }