ShapeBaseAspectRatioLocked Property
Specifies whether the shape's aspect ratio is locked.

Namespace: Aspose.Words.Drawing
Assembly: Aspose.Words (in Aspose.Words.dll) Version: 19.12
Syntax
public bool AspectRatioLocked { get; set; }

Property Value

Type: Boolean
Remarks

The default value depends on the ShapeType, for the ShapeType.Image it is true but for the other shape types it is false.

Has effect for top level shapes only.

Examples
Shows how to set "AspectRatioLocked" for the shape object
Document doc = new Document(MyDir + "Shape.ActiveXObject.docx");

// Get shape object from the document and set AspectRatioLocked(it is possible to get/set AspectRatioLocked for child shapes (mimic MS Word behavior), 
// but AspectRatioLocked has effect only for top level shapes!)
Shape shape = (Shape) doc.GetChild(NodeType.Shape, 0, true);
shape.AspectRatioLocked = isLocked;
See Also