PresetShadowEffect.Angle Property
Gets or sets the shadow angle in degrees.
Namespace: DevExpress.Docs.Office
Assembly: DevExpress.Docs.Core.v26.1.dll
Declaration
Property Value
| Type | Description |
|---|---|
| Int32 | The shadow angle in degrees. |
Remarks
The PresetShadowEffect class exposes properties that you can use to configure the preset shadow effect:
- Color
- Specifies the preset shadow color.
Angle- Specifies the angle of the shadow’s offset.
- Distance
- Specifies how far to offset the shadow.
- Type
- Specifies the preset shadow type.
The following code snippet applies a preset shadow effect to a shape:
using DevExpress.Docs.Presentation;
using System.Drawing;
using DevExpress.Docs;
namespace PresentationApiSample;
public class Program {
public static void Main(string[] _) {
Presentation presentation = new Presentation();
presentation.Slides.Clear();
Slide slide = new Slide(SlideLayoutType.Blank);
presentation.Slides.Add(slide);
Shape shape1 = new Shape(ShapeType.Rectangle);
shape1.Outline = new LineStyle { Fill = new SolidFill(Color.RoyalBlue), Width = 8 };
shape1.Fill = new SolidFill(Color.White);
shape1.X = 1100;
shape1.Y = 1100;
shape1.Width = 300;
shape1.Height = 300;
slide.Shapes.Add(shape1);
ShapeEffectProperties e_properties = new ShapeEffectProperties();
e_properties.PresetShadow = new PresetShadowEffect {
Color = new OfficeColor(Color.Gray),
Angle = 45,
Distance = 50,
Type = PresetShadowType.BottomLeftDrop
};
shape1.Effects = e_properties;
}
}
See Also