UIElement.Effect Property
Gets or sets the pixel shader effect to use for rendering this UIElement.
Namespace: System.Windows
Assembly: System.Windows (in System.Windows.dll)
<uiElement> <uiElement.Effect> singleEffect </uiElement.Effect> </uiElement>
XAML Values
Property Value
Type: System.Windows.Media.Effects.EffectThe pixel shader effect to use for rendering this UIElement. The default is null (no effects).
Dependency property identifier field: EffectProperty
Examples of effects that can be applied are BlurEffect and DropShadowEffect.
Version Notes
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.
For another example that shows how to define a custom shader-based effect and then apply it as a custom XAML element, see PixelShader.
For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.