private void NewVersion_LostFocus(object sender, RoutedEventArgs e) { if (selectedProjectProduct == null) { return; } bool success = ProjectFunctions.AmendNewVersion(selectedProjectProduct, NewVersion.Text, (editMode == ByProject)); if (success) { refreshEditPage(); CommitButton.IsEnabled = true; } else { NewVersion.Text = selectedProjectProduct.NewVersion.ToString("#0.0"); } }