Method CreateSwatchAsync
CreateSwatchAsync(long, CancellationToken)
Creates a swatch image with the template's thumbnail or symbology from the specified layer.
Declaration
public Task<RuntimeImage> CreateSwatchAsync(long layerId, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| long | layerId | An ID that identifies the layer for which a swatch image is requested. |
| CancellationToken | cancellationToken | A cancellation token that can be used to cancel the operation. |
Returns
| Type | Description |
|---|---|
| Task<RuntimeImage> | A RuntimeImage with a visual representation of this template. |
Remarks
In the absence of a thumbnail for this template, the symbology from the specified layer is used to determine a swatch image, provided this layer is loaded and is one of the LayerIds.
Applies to
Platforms and versions
| Target | Versions |
|---|---|
| .NET | 300 |
| .NET Windows | 300 |
| .NET Android | 300 |
| .NET iOS | 300 |