public AddEditDocumentAuthorDialog() { InitializeComponent(); AddEditDocumentAuthorModel model = new AddEditDocumentAuthorModel(); model.View = this; DataContext = model; }
public AddEditDocumentAuthorDialog(int id) { InitializeComponent(); AddEditDocumentAuthorModel model = new AddEditDocumentAuthorModel(id); model.View = this; model.DataLoaded += () => { DataContext = model; Utils.ResetOriginalValues(this); }; }