ESRI.ArcGIS.ADF.IMS
Create(FeatureType,Color) Method
See Also  Example
ESRI.ArcGIS.ADF.IMS.Display.Renderer Namespace > SimpleRenderer Class > Create Method : Create(FeatureType,Color) Method




type
color
Creates a new SimpleRenderer object with a symbol of given properties.

Syntax

Visual Basic (Declaration) 
Public Overloads Shared Function Create( _
   ByVal type As FeatureType, _
   ByVal color As Color _
) As SimpleRenderer
Visual Basic (Usage)Copy Code
Dim type As FeatureType
Dim color As Color
Dim value As SimpleRenderer
 
value = SimpleRenderer.Create(type, color)
C# 
public static SimpleRenderer Create( 
   FeatureType type,
   Color color
)

Parameters

type
color

Return Value

New SimpleRenderer object.

Example

The following example retrieves an existing map layer and replaces its renderer using the Create method.
Visual BasicCopy Code
Dim layer As FeatureLayer = mapView.Layers.FindByName("Countries")

layer.Renderer = SimpleRenderer.Create(FeatureType.Polygon, Drawing.Color.Wheat)

C#Copy Code
FeatureLayer layer = mapView.Layers.FindByName("Countries"); 

layer.Renderer = SimpleRenderer.Create(FeatureType.Polygon, Drawing.Color.Wheat); 

    

Remarks

The SimpleRenderer Create methods are convenience methods for quickly creating a renderer along with a simple symbol for the renderer. Depending on the type of layer, the symbol created is a SimpleMarkerSymbol (for point layers), SimpleLineSymbol (for line layers), or SimpleFillSymbol (for polygon layers).

To create a renderer that uses other symbol types, create the symbol separately, then assign it to a renderer created with one of the SimpleRenderer constructors.

See Also

© 2010 All Rights Reserved.