officefileapi-devexpress-dot-docs-dot-presentation-dot-presetshadoweffect-f9ddea42.md
Gets or sets the preset shadow effect type.
Namespace : DevExpress.Docs.Presentation
Assembly : DevExpress.Docs.Presentation.v25.2.dll
NuGet Package : DevExpress.Docs.Presentation
public PresetShadowType Type { get; set; }
Public Property Type As PresetShadowType
| Type | Description |
|---|---|
| PresetShadowType |
The shadow effect type.
|
Available values:
Show 20 items
| Name | Description |
|---|---|
| TopLeftDrop |
The TopLeftDrop preset shadow is applied to the shape.
| | TopRightDrop |
The TopRightDrop preset shadow is applied to the shape.
| | BackLeftPerspective |
The BackLeftPerspective preset shadow is applied to the shape.
| | BackRightPerspective |
The BackRightPerspective preset shadow is applied to the shape.
| | BottomLeftDrop |
The BottomLeftDrop preset shadow is applied to the shape.
| | BottomRightDrop |
The BottomRightDrop preset shadow is applied to the shape.
| | FrontLeftPerspective |
The FrontLeftPerspective preset shadow is applied to the shape.
| | FrontRightPerspective |
The FrontRightPerspective preset shadow is applied to the shape.
| | TopLeftSmallDrop |
The TopLeftSmallDrop preset shadow is applied to the shape.
| | TopLeftLargeDrop |
The TopLeftLargeDrop preset shadow is applied to the shape.
| | BackLeftLongPerspective |
The BackLeftLongPerspective preset shadow is applied to the shape.
| | BackRightLongPerspective |
The BackRightLongPerspective preset shadow is applied to the shape.
| | TopLeftDoubleDrop |
The TopLeftDoubleDrop preset shadow is applied to the shape.
| | BottomRightSmallDrop |
The BottomRightSmallDrop preset shadow is applied to the shape.
| | FrontLeftLongPerspective |
The FrontLeftLongPerspective preset shadow is applied to the shape.
| | FrontRightLongPerspective |
The FrontRightLongPerspective preset shadow is applied to the shape.
| | OuterBox3d |
The OuterBox3d preset shadow is applied to the shape.
| | InnerBox3d |
The InnerBox3d preset shadow is applied to the shape.
| | BackCenterPerspective |
The BackCenterPerspective preset shadow is applied to the shape.
| | FrontBottomShadow |
The FrontBottomShadow preset shadow is applied to the shape.
|
The PresetShadowEffect class exposes properties that you can use to configure the preset shadow effect:
ColorSpecifies the preset shadow color.AngleSpecifies the angle of the shadow’s offset.DistanceSpecifies how far to offset the shadow.TypeSpecifies 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;
}
}
Imports DevExpress.Docs.Presentation
Imports System.Drawing
Imports DevExpress.Docs
Namespace PresentationApiSample
Public Class Program
Public Shared Sub Main(ByVal args As String())
Dim presentation As New Presentation()
presentation.Slides.Clear()
Dim slide As New Slide(SlideLayoutType.Blank)
presentation.Slides.Add(slide)
Dim shape1 As New Shape(ShapeType.Rectangle)
shape1.Outline = New LineStyle With {
.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)
Dim e_properties As New ShapeEffectProperties()
e_properties.PresetShadow = New PresetShadowEffect With {
.Color = New OfficeColor(Color.Gray),
.Angle = 45,
.Distance = 50,
.Type = PresetShadowType.BottomLeftDrop
}
shape1.Effects = e_properties
End Sub
End Class
End Namespace
See Also