ArcGIS Pro 3.3 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / MappingExtensions Class / RemoveTemplate Method / RemoveTemplate(MapMember,EditingTemplate) Method
The map member containing the template.
The template to be removed.
Example

In This Topic
    RemoveTemplate(MapMember,EditingTemplate) Method
    In This Topic
    Removes the specified template.
    Syntax
    public static void RemoveTemplate( 
       MapMember mapMember,
       EditingTemplate template
    )
    Public Overloads Shared Sub RemoveTemplate( _
       ByVal mapMember As MapMember, _
       ByVal template As EditingTemplate _
    ) 

    Parameters

    mapMember
    The map member containing the template.
    template
    The template to be removed.
    Example
    Remove a table template
    var table = MapView.Active.Map.GetStandaloneTablesAsFlattenedList().FirstOrDefault();
    if (table == null)
      return;
    QueuedTask.Run(() =>
    {
      var tableTemplate = table.GetTemplate("Template1");
      //Removing a table template
      table.RemoveTemplate(tableTemplate);
      //Removing a template by name
      table.RemoveTemplate("Template2");
    });
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3 or higher.
    See Also