ArcGIS Pro 2.6 API Reference Guide
GeneratePreview Method

ArcGIS.Desktop.Mapping Namespace > StyleItem Class : GeneratePreview 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.
Creates a preview image for the style item. This method must be called on the MCT. Use QueuedTask.Run.
Syntax
public static ImageSource GeneratePreview( 
   StyleItem item,
   int patchHeight,
   int patchWidth
)
Public Shared Function GeneratePreview( _
   ByVal item As StyleItem, _
   ByVal patchHeight As Integer, _
   ByVal patchWidth As Integer _
) As 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.
Exceptions
ExceptionDescription
This method must be called within the lambda passed to QueuedTask.Run
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 7

See Also

Reference

StyleItem Class
StyleItem Members