Compartilhar via


ElementPropertyDescriptor.SetValue Method

Sets the value of the domain property.

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

Syntax

'Declaração
Public Overrides Sub SetValue ( _
    component As Object, _
    value As Object _
)
public override void SetValue(
    Object component,
    Object value
)
public:
virtual void SetValue(
    Object^ component, 
    Object^ value
) override
abstract SetValue : 
        component:Object * 
        value:Object -> unit 
override SetValue : 
        component:Object * 
        value:Object -> unit 
public override function SetValue(
    component : Object, 
    value : Object
)

Parameters

  • component
    Type: System.Object
    The model element for which to set the value of the property.

Exceptions

Exception Condition
ArgumentException

The described property is not bound to a model element and component is not derived from the ModelElement type.

Remarks

This method sets the value of the property inside a transaction.

If the ModelElement property of the descriptor is nulla null reference (Nothing in Visual Basic), then the component parameter is used as the model element on which to set the property value; otherwise, this method sets the value of the property from the model element with which it is associated. This association is formed when the property descriptor is created.

If the domain property is read-only, then its value is not changed.

.NET Framework Security

See Also

Reference

ElementPropertyDescriptor Class

Microsoft.VisualStudio.Modeling.Design Namespace

ElementPropertyDescriptor

ModelElement

GetValue

ResetValue

IsReadOnly