This document is archived and information here might be outdated. Recommended version. |
ArcObjects Help for .NET developers > ArcObjects namespaces > Carto > ESRI.ArcGIS.Carto > Interfaces > IF > IFeatureRenderer Interface > IFeatureRenderer.SymbolByFeature Property (ArcObjects .NET 10.5 SDK) |
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
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.