ArcGIS Pro 3.3 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / StyleItem Class / GenerateSymbolPreview Method
The symbol style item for which the preview image has to be created.
The highlight color to apply
The height of the preview image to be created.
The width of the preview image to be created.

In This Topic
    GenerateSymbolPreview Method
    In This Topic
    Creates a highlighted preview image for the symbol style item. This method must be called on the MCT. Use QueuedTask.Run.
    Syntax
    public static ImageSource GenerateSymbolPreview( 
       StyleItem styleItem,
       CIMColor highlightColor,
       int patchHeight,
       int patchWidth
    )
    Public Shared Function GenerateSymbolPreview( _
       ByVal styleItem As StyleItem, _
       ByVal highlightColor As CIMColor, _
       ByVal patchHeight As Integer, _
       ByVal patchWidth As Integer _
    ) As ImageSource

    Parameters

    styleItem
    The symbol style item for which the preview image has to be created.
    highlightColor
    The highlight color to apply
    patchHeight
    The height of the preview image to be created.
    patchWidth
    The width of the preview image to be created.

    Return Value

    The highlighted preview image for the style item.
    Exceptions
    ExceptionDescription
    This method must be called within the lambda passed to QueuedTask.Run
    Unsupported style item type
    Remarks
    The provided highlight is applied to the patch in an identical fashion to how highlighting is applied on the map (for example: when a feature was selected).
    Currently, only SymbolStyleItem is supported. Passing a style item other than SymbolStyleItem will throw a System.ArgumentException
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3 or higher.
    See Also