ArcGIS Pro 3.2 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / SymbolStyleItem Class / SymbolStyleItem Constructor / SymbolStyleItem Constructor(String)
Example

In This Topic
    SymbolStyleItem Constructor(String)
    In This Topic
    Creates a new instance of SymbolStyleItem class.
    Syntax
    public SymbolStyleItem( 
       string stylePath
    )
    Public Function New( _
       Optional ByVal stylePath As String _
    )

    Parameters

    stylePath
    Example
    Create a Swatch for a given symbol
    //Note: call within QueuedTask.Run()
    CIMSymbol symbol = SymbolFactory.Instance.ConstructPointSymbol(ColorFactory.Instance.GreenRGB, 1.0, SimpleMarkerStyle.Circle);
      //You can generate a swatch for a text symbols also.
      var si = new SymbolStyleItem()
      {
          Symbol = symbol,
          PatchHeight = 64,
          PatchWidth = 64
      };
      return si.PreviewImage;
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3 or higher.
    See Also