ShapeBaseTitle Property
Gets or sets the title (caption) of the current shape object.

Namespace: Aspose.Words.Drawing
Assembly: Aspose.Words (in Aspose.Words.dll) Version: 20.1
public string Title { get; set; }

Property Value

Type: String

Default is empty string.

Cannot be null, but can be an empty string.

Shows how to get or set title of shape object.
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);

// Create test shape
Shape shape = new Shape(doc, ShapeType.Cube);
shape.Width = 431.5;
shape.Height = 346.35;
shape.Title = "Alt Text Title";


MemoryStream dstStream = new MemoryStream();
doc.Save(dstStream, SaveFormat.Docx);

shape = (Shape) doc.GetChild(NodeType.Shape, 0, true);
Console.WriteLine("Shape text: " + shape.Title);
See Also