This document is archived and information here might be outdated.  Recommended version.


IColorRamp.CreateRamp Method (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > Display > ESRI.ArcGIS.Display > Interfaces > IC > IColorRamp Interface > IColorRamp.CreateRamp Method
ArcGIS Developer Help

IColorRamp.CreateRamp Method

Generates a color ramp with length determined by Size value.

[Visual Basic .NET]
Public Sub CreateRamp ( _
    ByRef ok As Boolean _
)
[C#]
public void CreateRamp (
    ref bool ok
);
[C++]
HRESULT CreateRamp(
  Boolean* ok
);
[C++]
Parameters
ok [out]

ok is a parameter of type bool*

Product Availability

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

Description

CreateRamp generates the number of colors in a color ramp as specified in the Size property.  The boolean pOK is a mask, i.e., you supply the boolean object and the method will set its value.  Generally speaking pOK will only return false if a property is missing.

Remarks

Use the CreateRamp after you have set the other properties like Size and the colors specific paramters.

See Also

IColorRamp Interface | IMultiPartColorRamp Interface | IColorRamp.Color Property | IColorRamp.CreateRamp Method | IRandomColorRamp Interface | IColorRamp Interface | IPresetColorRamp Interface | IAlgorithmicColorRamp Interface

.NET Samples

Create a custom default raster catalog renderer Retrieve a color ramp from the SymbologyControl