14.2. Effects

WPF provides visual effects that you can apply to any element. The goal of effects is to give you an easy, declarative way to enhance the appearance of text, images, buttons, and other controls. Rather than write your own drawing code, you simply use one of the classes that derives from Effect (in the System.Windows.Media.Effects namespace) to get instant effects such as blurs, glows, and drop shadows.

Table 14-2 lists the effect classes that you can use.

Table 14.2. Effects
NameDescriptionProperties
BlurEffectBlurs the content in your element.Radius, KernelType, RenderingBias
DropShadowEffectAdds a rectangular drop shadow behind your element.BlurRadius, Color, Direction, Opacity, ShadowDepth, RenderingBias
ShaderEffectApplies a pixel ...

Get Pro WPF in C# 2010: Windows Presentation Foundation in .NET 4 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.