ArcGIS Pro 3.0 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / StyleItem Class / PatchHeight Property
Example

In This Topic
    PatchHeight Property (StyleItem)
    In This Topic
    Gets or sets the height of the preview image for the style item.
    Syntax
    public int PatchHeight {get; set;}
    Public Property PatchHeight As Integer
    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, Windows 8.1

    See Also