UIElement.Effect Property

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Gets or sets the pixel shader effect to use for rendering this UIElement.

Namespace:  System.Windows
Assembly:  System.Windows (in System.Windows.dll)


Public Property Effect As Effect
public Effect Effect { get; set; }

XAML Values

Property Value

Type: System.Windows.Media.Effects.Effect
The pixel shader effect to use for rendering this UIElement. The default is nulla null reference (Nothing in Visual Basic) (no effects).


Dependency property identifier field: EffectProperty

Examples of effects that can be applied are BlurEffect and DropShadowEffect.

Version Notes

Silverlight for Windows Phone Silverlight for Windows Phone

For Silverlight for Windows Phone, you need to set a CacheMode value in order to apply an Effect.


The following example shows a simple XAML definition of a BlurEffect value for Effect.

    <Button Content="You Can't Read This!"  Width="200">
            <BlurEffect Radius="10" />

For another example that shows how to define a custom shader-based effect and then apply it as a custom XAML element, see PixelShader.

Version Information


Supported in: 5, 4, 3


For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.