ArcGIS Pro 2.8 API Reference Guide
GetTemplates Method (MappingExtensions)

ArcGIS.Desktop.Mapping Namespace > MappingExtensions Class : GetTemplates Method
the layer to retrieve templates from.
Retrieves all templates for a layer.
Syntax
public static IEnumerable<EditingTemplate> GetTemplates( 
   Layer layer
)
Public Shared Function GetTemplates( _
   ByVal layer As Layer _
) As IEnumerable(Of EditingTemplate)

Parameters

layer
the layer to retrieve templates from.

Return Value

An enumeration of templates.
Remarks
If called on the MCT and templates are not yet loaded the templates will load and be returned. If called on the UI thread and templates are not yet loaded, the return value will be empty even though (unloaded) templates may exist for the layer. See also AreTemplatesLoaded
Requirements

Target Platforms: Windows 10, Windows 8.1

See Also

Reference

MappingExtensions Class
MappingExtensions Members