Transparency

ReflectionFormat.Transparency property

Gets or sets a double value between 0.0 (opaque) and 1.0 (clear) representing the degree of transparency for the reflection effect. The default value is 0.0.

public double Transparency { get; set; }

Examples

Shows how to interact with reflection shape effect.

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

shape.Reflection.Transparency = 0.37;
shape.Reflection.Size = 0.48;
shape.Reflection.Blur = 17.5;
shape.Reflection.Distance = 9.2;

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

doc = new Document(ArtifactsDir + "Shape.Reflection.docx");
shape = (Shape)doc.GetChild(NodeType.Shape, 0, true);

Assert.AreEqual(0.37d, shape.Reflection.Transparency, 0.01d);
Assert.AreEqual(0.48d, shape.Reflection.Size, 0.01d);
Assert.AreEqual(17.5d, shape.Reflection.Blur, 0.01d);
Assert.AreEqual(9.2d, shape.Reflection.Distance, 0.01d);

shape.Reflection.Remove();

Assert.AreEqual(0, shape.Reflection.Transparency);
Assert.AreEqual(0, shape.Reflection.Size);
Assert.AreEqual(0, shape.Reflection.Blur);
Assert.AreEqual(0, shape.Reflection.Distance);

See Also