Show / Hide Table of Contents

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
TargetVersions
.NET300
.NET Windows300
.NET Android300
.NET iOS300
In this article
Provide feedback
Back to top Copyright © 2025 Esri.