//Create ellipse paragraph text with basic text settings and optionally a modified border.
//Construct on the worker thread
await QueuedTask.Run(() =>
{
//Build geometry
Coordinate2D center = new Coordinate2D(4.5, 2.75);
//At 2.x - EllipticArcBuilder eabElp = new EllipticArcBuilder(center, 0, 1, 0.45, esriArcOrientation.esriArcClockwise);
var eabElp = new EllipticArcBuilderEx(center, 0, 1, 0.45, ArcOrientation.ArcClockwise);
EllipticArcSegment ellipse = eabElp.ToSegment();
var polyElp = PolygonBuilderEx.CreatePolygon(
PolylineBuilderEx.CreatePolyline(ellipse));
//Set symbolology, create and add element to layout
CIMTextSymbol sym = SymbolFactory.Instance.ConstructTextSymbol(ColorFactory.Instance.BlueRGB, 10, "Arial", "Regular");
string text = "Ellipse, ellipse, ellipse, ellipse, ellipse, ellipse, ellipse, ellipse, ellipse, ellipse, ellipse, ellipse";
//At 2.x - GraphicElement elpTxtElm = LayoutElementFactory.Instance.CreateEllipseParagraphGraphicElement(layout, ellipse, text, sym);
// elpTxtElm.SetName("New Ellipse Text");
GraphicElement elpTxtElm = ElementFactory.Instance.CreateTextGraphicElement(
layout, TextType.EllipseParagraph, polyElp, sym, text, "New Ellipse Text");
//(Optionally) Modify paragraph border
CIMGraphic elpTxtGra = elpTxtElm.GetGraphic();
CIMParagraphTextGraphic cimElpTxtGra = elpTxtGra as CIMParagraphTextGraphic;
cimElpTxtGra.Frame.BorderSymbol = new CIMSymbolReference();
cimElpTxtGra.Frame.BorderSymbol.Symbol = SymbolFactory.Instance.ConstructLineSymbol(ColorFactory.Instance.GreyRGB, 1.0, SimpleLineStyle.Solid);
elpTxtElm.SetGraphic(elpTxtGra);
});