Skip to main content
All docs
V25.2
  • EffectPropertiesBase.Reflection Property

    Gets or sets a reflection effect.

    Namespace: DevExpress.Docs.Presentation

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

    Declaration

    public ReflectionEffect Reflection { get; set; }

    Property Value

    Type Description
    ReflectionEffect

    A ReflectionEffect object that contains reflection effect options.

    Remarks

    The ReflectionEffect class exposes properties that you can use to configure the reflection effect:

    Angle
    Specifies the angle of the reflection effect in degrees.
    BlurRadius
    Specifies the blur radius of the reflection effect.
    Distance
    Specifies how far to offset the reflection relative to the shape.
    StartOpacity | EndOpacity
    Specifies the start and end opacity of the reflection effect.
    StartPosition | EndPosition
    Specifies the start and end position of the reflection effect.
    FadeAngle
    Specifies the fade angle of the reflection effect.
    HorizontalScale | VerticalScale
    Specifies the horizontal and vertical scale factors of the reflection effect.
    HorizontalSkew | VerticalSkew
    Specifies the horizontal and vertical skew angles of the reflection effect. This property is measured in degrees and can have values in the (-90, 90) range.
    RotateWithShape
    Specifies whether the reflection effect rotates with the shape.

    The following code snippet applies a reflection effect to a shape:

    using DevExpress.Docs.Presentation;
    using System.Drawing;
    
    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 OutlineStyle { Fill = new SolidFill(Color.RoyalBlue), Width = 8 };
            shape1.Fill = new SolidFill(Color.RoyalBlue);
            shape1.X = 1100;
            shape1.Y = 1100;
            shape1.Width = 300;
            shape1.Height = 300;
            slide.Shapes.Add(shape1);
    
            ShapeEffectProperties e_properties = new ShapeEffectProperties();
            e_properties.Reflection = new ReflectionEffect {
                Angle = 45,
                BlurRadius = 50,
                Distance = 50,
                StartOpacity = 0,
                EndOpacity = 100,
                StartPosition = 0,
                EndPosition = 100,
                FadeAngle = 45,
                HorizontalScale = 100,
                VerticalScale = 100,
                HorizontalSkew = 0,
                VerticalSkew = 0,
                RotateWithShape = true,
                ShadowAlignment = RectangleAlignType.Center
            };
            shape1.Effects = e_properties;
        }
    }
    
    See Also