public AddEditPipeClassDialog() { InitializeComponent(); PipeClassViewModel viewModel = new PipeClassViewModel(); viewModel.View = this; DataContext = viewModel; }
public AddEditPipeClassDialog(int pipeClassId) { InitializeComponent(); PipeClassViewModel viewModel = new PipeClassViewModel(pipeClassId); viewModel.View = this; viewModel.DataLoaded += () => { DataContext = viewModel; Utils.ResetOriginalValues(this); }; }