ArcGIS Pro 2.3 API Reference Guide
SetName Method (Element)
Example 

ArcGIS.Desktop.Layouts Namespace > Element Class : SetName Method
String
Sets the name of the element. This method must be called on the MCT. Use QueuedTask.Run.
Syntax
Public Sub SetName( _
   ByVal name As String _
) 
public void SetName( 
   string name
)

Parameters

name
String
Exceptions
ExceptionDescription
This method must be called within the lambda passed to QueuedTask.Run.
Remarks
All elements on a layout must have a unique name so they can be easily referenced.
Example
//Modify an element's name.

//Perform on the worker thread
await QueuedTask.Run(() =>
{
  element.SetName("New Name");
});
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 7

See Also

Reference

Element Class
Element Members