ArcGIS Pro 2.7 API Reference Guide
SetDefinition Method (Element)
Example 

ArcGIS.Desktop.Layouts Namespace > Element Class : SetDefinition Method
CIMElement
Applies the changes made to a modified CIMElement back to the element on the page layout. This method must be called on the MCT. Use QueuedTask.Run.
Syntax
public void SetDefinition( 
   CIMElement cimElement
)
Public Sub SetDefinition( _
   ByVal cimElement As CIMElement _
) 

Parameters

cimElement
CIMElement
Exceptions
ExceptionDescription
This method must be called within the lambda passed to QueuedTask.Run.
Example
//Modify an element's CIM properties.

//Perform on the worker thread
await QueuedTask.Run(() =>
{
  CIMElement CIMElm = element.GetDefinition();

  //Modify a CIM value

  element.SetDefinition(CIMElm);
});
Requirements

Target Platforms: Windows 10, Windows 8.1

See Also

Reference

Element Class
Element Members