UIElement.Effect Property
Silverlight
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 a 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
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.
<StackPanel> <Button Content="You Can't Read This!" Width="200"> <Button.Effect> <BlurEffect Radius="10" /> </Button.Effect> </Button> </StackPanel>
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.
Community Additions
ADD
Show: