//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);
//Construct element on worker thread
await QueuedTask.Run(() =>
{
//Create with default text properties
//At 2.x - TextElement titleGraphics =
// LayoutElementFactory.Instance.CreatePointTextGraphicElement(
// layout, llTitle, null) as TextElement;
TextElement titleGraphics = ElementFactory.Instance.CreateTextGraphicElement(
container, TextType.PointText, llTitle.ToMapPoint(), null, title) as TextElement;
//Modify the text properties
titleGraphics.SetTextProperties(new TextProperties(title, "Arial", 24, "Bold"));
});