Back to Devexpress

EffectProperties.Blur Property

officefileapi-devexpress-dot-docs-dot-presentation-dot-effectproperties.md

latest3.9 KB
Original Source

EffectProperties.Blur Property

Gets or sets a blur effect.

Namespace : DevExpress.Docs.Presentation

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

NuGet Package : DevExpress.Docs.Presentation

Declaration

csharp
public BlurEffect Blur { get; set; }
vb
Public Property Blur As BlurEffect

Property Value

TypeDescription
BlurEffect

A BlurEffect object that contains blur effect options.

|

Remarks

The BlurEffect class exposes properties that you can use to configure the blur effect:

Grow

Specifies whether the blur effect extends beyond the original bounds of the shape:

Radius

Specifies the radius of the blur effect:

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

csharp
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.White);
        shape1.X = 100;
        shape1.Y = 100;
        shape1.Width = 300;
        shape1.Height = 300;
        slide.Shapes.Add(shape1);

        ShapeEffectProperties e_properties = new ShapeEffectProperties();
        e_properties.Blur = new BlurEffect {
            Grow = false,
            Radius = 60
        };
        shape1.Effects = e_properties;
    }
}
vb
Imports DevExpress.Docs.Presentation
Imports System.Drawing

Namespace PresentationApiSample

    Public Class Program
        Public Shared Sub Main(__ As String())

            Dim presentation As Presentation = New Presentation()
            presentation.Slides.Clear()

            Dim slide As Slide = New Slide(SlideLayoutType.Blank)
            presentation.Slides.Add(slide)

            Dim shape1 As Shape = New Shape(ShapeType.Rectangle)
            shape1.Outline = New OutlineStyle With {
                    .Fill = New SolidFill(Color.RoyalBlue),
                    .Width = 8
                }
            shape1.Fill = New SolidFill(Color.White)
            shape1.X = 100
            shape1.Y = 100
            shape1.Width = 300
            shape1.Height = 300
            slide.Shapes.Add(shape1)

            Dim e_properties As ShapeEffectProperties = New ShapeEffectProperties()
            e_properties.Blur = New BlurEffect With {
                .Grow = False,
                .Radius = 60
            }

            shape1.Effects = e_properties
        End Sub
    End Class
End Namespace

See Also

EffectProperties Class

EffectProperties Members

DevExpress.Docs.Presentation Namespace