ESRI.ArcGIS.ADF.IMS
GradientFillSymbol Class
Members  Example  See Also 
ESRI.ArcGIS.ADF.IMS.Display.Symbol Namespace : GradientFillSymbol Class




FillSymbol used to fill polygons with a gradual gradient based on two colors.

Syntax

Visual Basic (Declaration) 
<SerializableAttribute()>
Public Class GradientFillSymbol 
   Inherits FillSymbol
Visual Basic (Usage)Copy Code
Dim instance As GradientFillSymbol
C# 
[SerializableAttribute()]
public class GradientFillSymbol : FillSymbol 

Example

This example replaces the existing symbol for a countries layer with a GradientFillSymbol, which shades each country with a gradient vertically with a transition between two colors.
Visual BasicCopy Code
' Create a new symbol and set its properties

Dim gradientFillSymb As New GradientFillSymbol()

gradientFillSymb.Type = GradientFillType.Vertical

gradientFillSymb.StartColor = Drawing.Color.AntiqueWhite

gradientFillSymb.FinishColor = Drawing.Color.Olive

gradientFillSymb.Antialiasing = False

gradientFillSymb.AllowLabelOverlap = True

gradientFillSymb.Transparency = 0



' Retrieve the renderer for an existing polygon layer

Dim layer As FeatureLayer = mapView.Layers.FindByName("Countries")

Dim renderer As SimpleRenderer = layer.Renderer



' Replace the renderer's symbol with the one we created

renderer.Symbol = simpleFillSymb

C#Copy Code
// Create a new symbol and set its properties 

GradientFillSymbol gradientFillSymb = new GradientFillSymbol(); 

gradientFillSymb.Type = GradientFillType.Vertical; 

gradientFillSymb.StartColor = Drawing.Color.AntiqueWhite; 

gradientFillSymb.FinishColor = Drawing.Color.Olive; 

gradientFillSymb.Antialiasing = false; 

gradientFillSymb.AllowLabelOverlap = true; 

gradientFillSymb.Transparency = 0; 

  

// Retrieve the renderer for an existing polygon layer 

FeatureLayer layer = mapView.Layers.FindByName("Countries"); 

SimpleRenderer renderer = layer.Renderer; 

  

// Replace the renderer's symbol with the one we created 

renderer.Symbol = simpleFillSymb; 

    

Remarks

GradientFillSymbol fills each polygon to which the renderer applies with a gradual gradient, from the StartColor to the FinishColor. The Type property determines where the StartColor starts and in which direction the change progresses.

GradientFillSymbol does not outline polygon features. If outlines are desired, it is possible to use a GroupRenderer to combine this symbol with a SimpleFillSymbol (or a line symbol).

For ArcMap Server image services, valid only for acetate layers. ArcMap Server ignores several of the properties of this class. For details, see the topic for GRADIENTFILLSYMBOL in the ArcIMS Help, at ArcXML Guide - Symbol elements - GRADIENTFILLSYMBOL. The ArcIMS Help is also available online at ESRI).

Inheritance Hierarchy

System.Object
   ESRI.ArcGIS.ADF.IMS.Display.Symbol.Symbol
      ESRI.ArcGIS.ADF.IMS.Display.Symbol.FeatureSymbol
         ESRI.ArcGIS.ADF.IMS.Display.Symbol.FillSymbol
            ESRI.ArcGIS.ADF.IMS.Display.Symbol.GradientFillSymbol

See Also

© 2010 All Rights Reserved.