ArcGIS Pro 3.0 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / SymbolFactory Class / ConstructStroke Method / ConstructStroke(CIMColor,Double) Method
ArcGIS.Core.CIM.CIMColor
The width of stroke to construct.
Example

ConstructStroke(CIMColor,Double) Method
Constructs a stroke of specific color and width.
Syntax
public CIMStroke ConstructStroke( 
   CIMColor color,
   double width
)

Parameters

color
ArcGIS.Core.CIM.CIMColor
width
The width of stroke to construct.

Return Value

Example
How to construct a line symbol from a stroke
CIMStroke stroke = SymbolFactory.Instance.ConstructStroke(ColorFactory.Instance.BlackRGB, 2.0);
CIMLineSymbol lineSymbolFromStroke = SymbolFactory.Instance.ConstructLineSymbol(stroke);
How to construct a multilayer line symbol with circle markers on the line ends
//These methods must be called within the lambda passed to QueuedTask.Run
var lineStrokeRed = SymbolFactory.Instance.ConstructStroke(ColorFactory.Instance.RedRGB, 4.0);
var markerCircle = SymbolFactory.Instance.ConstructMarker(ColorFactory.Instance.RedRGB, 12, SimpleMarkerStyle.Circle);
markerCircle.MarkerPlacement = new CIMMarkerPlacementOnVertices()
{
  AngleToLine = true,
  PlaceOnEndPoints = true,
  Offset = 0
};
var lineSymbolWithCircles = new CIMLineSymbol()
{
  SymbolLayers = new CIMSymbolLayer[2] { markerCircle, lineStrokeRed }
};
Requirements

Target Platforms: Windows 11, Windows 10, Windows 8.1

ArcGIS Pro version: 2.0 or higher.
See Also