ArcGIS Pro 2.6 API Reference Guide
TextProperties Class
Members  Example 

ArcGIS.Desktop.Layouts Namespace : TextProperties Class
Represents a collection of text properties associated with a TextElement.
Syntax
public class TextProperties 
Public Class TextProperties 
Remarks
Each TextElement on a page layout has an associated set of text properties. This intermediate object allows you to change multiple text properties before pushing the changes back to the TextElement.
Example
//Modify the text properties for an existing text element.

//Reference a layoutitem in a project by name
LayoutProjectItem layoutItem = Project.Current.GetItems<LayoutProjectItem>().FirstOrDefault(item => item.Name.Equals("Layout"));

//Perform on the worker thread
await QueuedTask.Run(() =>
{
  //Reference and load the layout associated with the layout item
  Layout lyt = layoutItem.GetLayout();

  //Reference a text element by name
  TextElement txtElm = lyt.FindElement("Title") as TextElement;

  //Change placement
  txtElm.SetX(4.25);
  txtElm.SetY(8);

  //Change TextProperties
  TextProperties txt_prop = txtElm.TextProperties;
  txt_prop.FontSize = 48;
  txt_prop.Font = "Times New Roman";
  txt_prop.Text = "Some new text";
  txtElm.SetTextProperties(txt_prop);
});
Inheritance Hierarchy

System.Object
   ArcGIS.Desktop.Layouts.TextProperties

Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 7

See Also

Reference

TextProperties Members
ArcGIS.Desktop.Layouts Namespace