private void window_DataContextChanged(object sender, DependencyPropertyChangedEventArgs e) { _dataContext?.EndEdit(); _dataContext = (FileWrapper)DataContext; _dataContext?.BeginEdit(); }
private void Button_Click(object sender, RoutedEventArgs e) { DialogResult = true; _dataContext.EndEdit(); Close(); }