Skip to main content
All docs
V25.2
  • OuterShadowEffect.ShadowAlignment Property

    Gets or sets the shadow alignment relative to the shape.

    Namespace: DevExpress.Docs.Presentation

    Assembly: DevExpress.Docs.Presentation.v25.2.dll

    NuGet Package: DevExpress.Docs.Presentation

    Declaration

    public RectangleAlignType ShadowAlignment { get; set; }

    Property Value

    Type Description
    RectangleAlignType

    The shadow alignment relative to the shape.

    Available values:

    Name Description
    TopLeft

    The rectangle is aligned to the top-left corner of the object.

    Top

    The rectangle is aligned to the top of the object.

    TopRight

    The rectangle is aligned to the top-right corner of the object.

    Left

    The rectangle is aligned to the left of the object.

    Center

    The rectangle is centered.

    Right

    The rectangle is aligned to the right of the object.

    BottomLeft

    The rectangle is aligned to the bottom-left corner of the object.

    Bottom

    The rectangle is aligned to the bottom.

    BottomRight

    The rectangle is aligned to the bottom-right corner of the object.

    Remarks

    The Angle property has a higher priority than the ShadowAlignment property.

    The OuterShadowEffect class exposes properties that you can use to configure the outer shadow effect:

    BlurRadius

    Specifies the outer shadow’s blur radius.

    DevExpress Presentation API - OuterShadow BlurRadius

    Angle

    Specifies the angle to offset the shadow.

    DevExpress Presentation API - OuterShadow Angle

    Distance

    Specifies how far to offset the shadow.

    DevExpress Presentation API - OuterShadow Distance

    Color
    Specifies the outer shadow color.
    HorizontalScale | VerticalScale
    Specifies the horizontal and vertical scale factors of the shadow.
    HorizontalSkew | VerticalSkew

    Specifies the horizontal and vertical skew angles of the shadow. This property is measured in degrees and can have values in the (-90, 90) range.

    DevExpress Presentation API - OuterShadow Skew

    RotateWithShape
    Specifies whether the shadow rotates with the shape.

    The following code snippet applies an outer 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.OuterShadow = new OuterShadowEffect {
                Angle = 135,
                BlurRadius = 50,
                Color = new OfficeColor(Color.Gray),
                Distance = 50,
                HorizontalScale = 100,
                VerticalScale = 100,
                HorizontalSkew = 0,
                VerticalSkew = 0,
                RotateWithShape = true
            };
    
            shape1.Effects = e_properties;
        }
    }
    
    See Also