ArcGIS Pro 3.7 API Reference Guide
ArcGIS.Desktop.Layouts Namespace / TextProperties Class
Members Example

In This Topic
    TextProperties Class
    In This Topic
    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
    Create a Dynamic Point Text Element
    {
      //Create a dynamic text element.
    
      //Set the string with tags and the location
      String title = @"<dyn type = ""page"" property = ""name"" />";
      Coordinate2D llTitle = new Coordinate2D(6, 2.5);
      //Create with default text properties
      //Note: Must be on QueuedTask.Run
      TextElement titleGraphics = ElementFactory.Instance.CreateTextGraphicElement(
                      layout, TextType.PointText, llTitle.ToMapPoint(), null, title) as TextElement;
    
      //Modify the text properties
      titleGraphics.SetTextProperties(new TextProperties(title, "Arial", 24, "Bold"));
    }
    Inheritance Hierarchy

    System.Object
       ArcGIS.Desktop.Layouts.TextProperties

    Requirements

    Target Platforms: Windows 11 Home, Pro, Enterprise (64 bit)

    ArcGIS Pro version: 3.0 or higher.
    See Also