AdjustmentCollection

AdjustmentCollection class

表示只读集合Adjustment调整应用于指定形状的值。

public class AdjustmentCollection

特性

姓名描述
Count { get; }获取集合中包含的元素数量。
Item { get; }返回指定索引处的调整。

例子

展示如何使用调整原始值。

Document doc = new Document(MyDir + "Rounded rectangle shape.docx");
Shape shape = (Shape)doc.GetChild(NodeType.Shape, 0, true);

AdjustmentCollection adjustments = shape.Adjustments;
Assert.AreEqual(1, adjustments.Count);

Adjustment adjustment = adjustments[0];
Assert.AreEqual("adj", adjustment.Name);
Assert.AreEqual(16667, adjustment.Value);

adjustment.Value = 30000;

doc.Save(ArtifactsDir + "Shape.Adjustments.docx");

也可以看看