ArcGIS Pro 3.4 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / StyleItem Class / GeneratePreviewAsync Method
The style item for which the preview image has to be created.
The height of the preview image to be created.
The width of the preview image to be created.

In This Topic
    GeneratePreviewAsync Method (StyleItem)
    In This Topic
    Creates a preview image for the style item.
    Syntax
    public static Task<ImageSource> GeneratePreviewAsync( 
       StyleItem item,
       int patchHeight,
       int patchWidth
    )
    Public Shared Function GeneratePreviewAsync( _
       ByVal item As StyleItem, _
       ByVal patchHeight As Integer, _
       ByVal patchWidth As Integer _
    ) As Task(Of ImageSource)

    Parameters

    item
    The style item for which the preview image has to be created.
    patchHeight
    The height of the preview image to be created.
    patchWidth
    The width of the preview image to be created.

    Return Value

    The preview image for the style item.
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3.4 or higher.
    See Also