/// <summary> /// Update the property value within a transaction context /// </summary> /// <param name="updateCallback"></param> private void UpdatePropertyValue(UpdatePropertyValueCallback updatePropertyValueCallback, string txName) { try { PropertyWindowViewModelHelper.CreateCommandProcessorContext(_editingContext, txName); updatePropertyValueCallback(); } finally { PropertyWindowViewModelHelper.RemoveCommandProcessorContext(); } }
/// <summary> /// Update the property value within a shared transaction context. /// </summary> /// <param name="updateCallback"></param> private void UpdatePropertyValue(UpdatePropertyValueCallback updatePropertyValueCallback, string txName) { try { _contextItem.BeginPropertyValueUpdate(_wrappedCustomPropertyDescriptor.EditingContext, txName); updatePropertyValueCallback(); } catch (Exception) { // We need to inform the context-item that an exception has been raised so that the undo-scope can be closed. _contextItem.OnPropertyValueUpdateException(); throw; } finally { _contextItem.EndPropertyValueUpdate(); } }
/// <summary> /// Update the property value within a transaction context /// </summary> /// <param name="updateCallback"></param> private void UpdatePropertyValue(UpdatePropertyValueCallback updatePropertyValueCallback, string txName) { try { PropertyWindowViewModelHelper.CreateCommandProcessorContext(_editingContext, txName); updatePropertyValueCallback(); } finally { PropertyWindowViewModelHelper.RemoveCommandProcessorContext(); } }
/// <summary> /// Update the property value within a shared transaction context. /// </summary> /// <param name="updateCallback"></param> private void UpdatePropertyValue(UpdatePropertyValueCallback updatePropertyValueCallback, string txName) { try { _contextItem.BeginPropertyValueUpdate(_wrappedCustomPropertyDescriptor.EditingContext, txName); updatePropertyValueCallback(); } catch (Exception) { // We need to inform the context-item that an exception has been raised so that the undo-scope can be closed. _contextItem.OnPropertyValueUpdateException(); throw; } finally { _contextItem.EndPropertyValueUpdate(); } }