ArcGIS Pro 3.7 API Reference Guide
ArcGIS.Desktop.Core Namespace / SegmentSymbolOptions Class / SecondaryColor Property
Example

In This Topic
    SecondaryColor Property
    In This Topic
    Gets and sets the secondary color. Default value is White.
    Syntax
    Public Property SecondaryColor As CIMColor
    public CIMColor SecondaryColor {get; set;}
    Example
    Get Sketch Segment Symbology Options
    {
      var options = ApplicationOptions.EditingOptions;
    
      //var options = ApplicationOptions.EditingOptions;
      await QueuedTask.Run(() =>
      {
        var seg_options = options.GetSegmentSymbolOptions();
        //to convert the options to a symbol use
        //SymbolFactory. Note: this is approximate....sketch isn't using the
        //CIM directly for segments
        var layers = new List<CIMSymbolLayer>();
        var stroke0 = SymbolFactory.Instance.ConstructStroke(seg_options.PrimaryColor,
          seg_options.Width, SimpleLineStyle.Dash);
        layers.Add(stroke0);
        if (seg_options.HasSecondaryColor)
        {
          var stroke1 = SymbolFactory.Instance.ConstructStroke(
            seg_options.SecondaryColor, seg_options.Width, SimpleLineStyle.Solid);
          layers.Add(stroke1);
        }
        //segment symbology only
        var sketch_line = new CIMLineSymbol()
        {
          SymbolLayers = layers.ToArray()
        };
      });
    }
    Requirements

    Target Platforms: Windows 11 Home, Pro, Enterprise (64 bit)

    ArcGIS Pro version: 3.0 or higher.
    See Also