ArcGIS Pro 2.9 API Reference Guide
GetTemplates(MapMember) Method
Example 

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

Parameters

member
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 map member. See also AreTemplatesLoaded(MapMember)
Example
ArcGIS.Desktop.Framework.Threading.Tasks.QueuedTask.Run(() =>
{
  var map = ArcGIS.Desktop.Mapping.MapView.Active.Map;
  if (map == null)
    return;
  //Get a particular table template
  var tableTemplate = map.FindStandaloneTables("Address Points").FirstOrDefault()?.GetTemplate("Residences");
  //Get all the templates of a standalone table
  var ownersTableTemplates = map.FindStandaloneTables("Owners").FirstOrDefault()?.GetTemplates();
  var statisticsTableTemplates = MapView.Active.Map.GetStandaloneTablesAsFlattenedList().First(l => l.Name.Equals("Trading Statistics")).GetTemplates();
});
Requirements

Target Platforms: Windows 11, Windows 10, Windows 8.1

See Also

Reference

MappingExtensions Class
MappingExtensions Members
Overload List