Partager via


DomainPropertyValueHandler<TElement, TValue>.ValueChanging Method

Performs validation and raises the OnValueChanging event.

Namespace:  Microsoft.VisualStudio.Modeling
Assembly:  Microsoft.VisualStudio.Modeling.Sdk.10.0 (in Microsoft.VisualStudio.Modeling.Sdk.10.0.dll)

Syntax

'Déclaration
Protected Sub ValueChanging ( _
    element As TElement, _
    oldValue As TValue, _
    newValue As TValue _
)
protected void ValueChanging(
    TElement element,
    TValue oldValue,
    TValue newValue
)
protected:
void ValueChanging(
    TElement element, 
    TValue oldValue, 
    TValue newValue
)
member ValueChanging : 
        element:'TElement * 
        oldValue:'TValue * 
        newValue:'TValue -> unit 
protected function ValueChanging(
    element : TElement, 
    oldValue : TValue, 
    newValue : TValue
)

Parameters

  • oldValue
    Type: TValue
    The current value of the property.
  • newValue
    Type: TValue
    The new value of the property.

Exceptions

Exception Condition
InvalidOperationException

Operation is invoked outside of modeling transaction scope or there was an attempt to set a calculated property.

Remarks

This method is called by SetValue before the value is changed.

.NET Framework Security

See Also

Reference

DomainPropertyValueHandler<TElement, TValue> Class

Microsoft.VisualStudio.Modeling Namespace