ESRI.ArcGIS.ADF.IMS
Create(FeatureType,Color,Double,Boolean) Method
See Also  Example Send Feedback
ESRI.ArcGIS.ADF.IMS.Display.Symbol Namespace > FeatureSymbol Class > Create Method : Create(FeatureType,Color,Double,Boolean) Method




type
FeatureType of the FeatureLayer that the symbology will represent.
color
Color of the symbology.
transparency
The transparency value of the symbology. This value must be between 0 and 100.
antialiasing
Smooths edges of the symbology.
Creates a new FeatureSymbol object of given properties.

Syntax

Visual Basic (Declaration) 
Public Overloads Shared Function Create( _
   ByVal type As FeatureType, _
   ByVal color As Color, _
   ByVal transparency As Double, _
   ByVal antialiasing As Boolean _
) As FeatureSymbol
Visual Basic (Usage)Copy Code
Dim type As FeatureType
Dim color As Color
Dim transparency As Double
Dim antialiasing As Boolean
Dim value As FeatureSymbol
 
value = FeatureSymbol.Create(type, color, transparency, antialiasing)
C# 
public static FeatureSymbol Create( 
   FeatureType type,
   Color color,
   double transparency,
   bool antialiasing
)

Parameters

type
FeatureType of the FeatureLayer that the symbology will represent.
color
Color of the symbology.
transparency
The transparency value of the symbology. This value must be between 0 and 100.
antialiasing
Smooths edges of the symbology.

Return Value

New FeatureSymbol object.

Example

The following example creates a new line symbol and assigns it to an existing SimpleRenderer for a line layer.
Visual BasicCopy Code
' Create a new feature symbol using static methods
Dim featureSymb As FeatureSymbol = FeatureSymbol.Create(FeatureType.Line, Drawing.Color.DarkCyan, 0.7, False)
 
' Retrieve the simple renderer
Dim layer As FeatureLayer = mapView.Layers.FindByName("Rivers")
Dim grpRend As GroupRenderer = layer.Renderer
Dim simpleRend As SimpleRenderer = grpRend.Renderers(0)
 
' Assign the new symbol to the renderer
simpleRend.Symbol = featureSymb
C#Copy Code
// Create a new feature symbol using static methods
FeatureSymbol featureSymb = FeatureSymbol.Create(FeatureType.Line, Drawing.Color.DarkCyan, 0.7, False);
 
// Retrieve the simple renderer
FeatureLayer layer = mapView.Layers.FindByName("Rivers");
GroupRenderer grpRend = layer.Renderer;
SimpleRenderer simpleRend = grpRend.Renderers(0);
 
// Assign the new symbol to the renderer
simpleRend.Symbol = featureSymb;

Remarks

The Create static methods allow quick creation of a simple symbol type. Depending on the FeatureType specified in the first argument, it will return either a SimpleMarkerSymbol, a SimpleLineSymbol, or SimpleFillSymbol. If you need a different symbol type, use one of the constructors for the particular symbol type.

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

© 2011 All Rights Reserved.