private void ButtonBase_OnClick(object sender, RoutedEventArgs e) { var fileDialog = new OpenFileDialog(); var result = fileDialog.ShowDialog(); if (result != System.Windows.Forms.DialogResult.OK) { return; } var file = fileDialog.FileName; App.SudokuManager.GetFiles(file); var bindingExpression = BtnResolveAll.GetBindingExpression(IsEnabledProperty); if (bindingExpression != null) { bindingExpression.UpdateTarget(); } var bindingExpression1 = BtnSave.GetBindingExpression(IsEnabledProperty); if (bindingExpression1 != null) { bindingExpression1.UpdateTarget(); } }