Provides access to members that set a default property on an object.
When To Use
IPropertySupport is a generic interface implemented by most graphic elements and few other objects. IPropertySupport is used for updating generic properties of an object; it can be used by a client without the client needing to know the exact nature of the underlying class. Through IPropertySupport you can ask an object if another object applies to it (for instance, a color object). If the object does apply, you can apply a new object of that type or ask for the current object.
Members
Name | Description | |
---|---|---|
Applies | Indicates if the receiver can apply the given object at any given time. | |
Apply | Applies the given property to the receiver and returns the old object. | |
CanApply | Indicates if the receiver can apply the given object at that particular moment. | |
Current | The object currently being used. |
IPropertySupport.Applies Method
Indicates if the receiver can apply the given object at any given time.
Public Function Applies ( _
    ByVal pUnk As Object _
) As Boolean
public bool Applies (
    object pUnk
);
Remarks
Applies indicates whether the specified object can be applied to the current object. For instance, we might want to ask our CircleElement whether a Color object applies to it. If it does, then we can use the Apply method to update our CircleElement with the new Color object.
CanApply differs from Applies in that it is a check for the editability of the object at any given time. Applies indicates whether an object can be applied at all, while CanApply indicates whether an object can be applied at that particular moment.
IPropertySupport.Apply Method
Applies the given property to the receiver and returns the old object.
Public Function Apply ( _
    ByVal newObject As Object _
) As Object
public object Apply (
    object newObject
);
Remarks
Apply will apply the specified object to the current object. For instance, I might apply a Color object to my RectangleElement. When I execute Apply, the object I replace (the old object) is returned.
Use the Applies and CanApply methods to determine if an Apply can be used on an object.
IPropertySupport.CanApply Method
Indicates if the receiver can apply the given object at that particular moment.
Public Function CanApply ( _
    ByVal pUnk As Object _
) As Boolean
public bool CanApply (
    object pUnk
);
Remarks
CanApply indicates whether the specified object can be applied to the current object. For instance, we might want to ask our CircleElement whether a Color object applies to it. If it does, then we can use the Apply method to update our CircleElement with the new Color object.
CanApply differs from Applies in that it is a check for the editability of the object at any given time. Applies indicates whether an object can be applied at all, while CanApply indicates whether an object can be applied at that particular moment.
IPropertySupport.Current Property
The object currently being used.
Public Function get_Current ( _
    ByVal pUnk As Object _
) As Object
public object get_Current (
    object pUnk
);
Remarks
Current will return you the current object of the specified type. For instance, I may ask a CircleElement if it supports a Color object. If it does, then I can use Current to get the Color object currently applied to my CircleElement.
Classes that implement IPropertySupport
Classes | Description |
---|
Remarks
For FeatureLayer objects, the ArcGIS framework uses this interface to check to see if the specified display filter object can be applied to the layer. Applies indicates whether the specified display filter object can be applied generally, while CanApply indicates whether the specified display filter object can be applied at that particular moment. Current returns the current display filter. FeatureLayer objects also uses IPropertySupport to manage some renderer objects.