ArcObjects Library Reference (Carto)  

IFeatureRenderer.SymbolByFeature Property

Symbol used to draw the specified feature.

[Visual Basic .NET]
Public Function get_SymbolByFeature ( _
    ByVal Feature As IFeature _
) As ISymbol
[C#]
public ISymbol get_SymbolByFeature (
    IFeature Feature
);
[C++]
HRESULT get_SymbolByFeature(
  IFeature* Feature,
  ISymbol** Symbol
);
[C++]

Parameters

Feature [in]

  Feature is a parameter of type IFeature

Symbol [out, retval]

  Symbol is a parameter of type ISymbol

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Remarks

You can use this method to access the symbol that will be used by a feature renderer to draw a given feature.  A copy of the symbol will be returned rather than a reference to it.

You may need to call PrepareFilter on the renderer before calling this method. This enables the renderer to determine the FieldIndex of the renderer field(s) in the FeatureClass. Otherwise the default symbol will be returned. Some renderer implementations may do this internally for you. Also, in some situations the framework will trigger PrepareFilter for you automatically.

This method is called by the framework during labeling and when converting features to graphics.  However, the labeling framework will call the methods on ILookupSymbol instead if the interface is implemented by a renderer because of performance gains of using a reference rather than a clone.

See Also

IFeatureRenderer Interface

.NET Samples

Multivariate renderer (Code Files: MultivariateRenderer) |

.NET Related Topics

3DAnalyst | Invalidating the display |