Bagikan melalui


Applying effects

You can apply graphic effects to the objects in your Windows Presentation Foundation (WPF) and Microsoft Silverlight projects in Blend for Visual Studio 2012. Effects appear in the Objects and Timeline panel under the object to which they are applied. They can be moved, copied, deleted, animated, reused, locked, and hidden, just like other objects. When they are selected, you can modify their properties in the Appearance category of the Properties panel.

A blur effect applied to rectangles, and a drop shadow applied to the containing grid

466a8a56-d045-40f6-92f3-729b30ab79ba

For more information, see the following topics:

Support for the old bitmap effects

In earlier versions of Blend, bitmap effects were simple pixel-processing operations that you could apply to objects in WPF projects. The supported bitmap effects included blur, outer glow, drop shadow, bevel, and emboss effects.

If you open a project in Blend that includes the old bitmap effects, you can still edit them in the Properties panel the same way you could before; however, you can't mix the old bitmap effects and the new type of effects on the same object.

If convenient, it is best to convert your old bitmap effects to the new effects. The new effects do not have the same negative effect on performance that the old bitmap effects had on large visuals or animations. For more information, see Modify previously existing bitmap effects.

Custom effects

Blend comes with several built-in effects. You can also import third-party effects, including those that mimic the old bitmap effects. Custom effects are contained in WPF or Silverlight assembly files (.dll files). You might obtain custom effects from a developer on your team, or you could search online for third-party effects. After you add a reference to the .dll file of effects to your project and build your solution, you can view the new effects in the Assets panel next to the existing effects that come with Blend. For more information, see Import third-party or custom effects.

If you are a developer, you can create your own custom effects in a program such as Microsoft Visual Studio and add those to your Blend project. For more information, see Creating custom effects.

Other options for creating effects

Microsoft Expression Design comes with an extensive selection of effects that you can apply to objects in an Expression Design document. You can create your art assets in Expression Design and then export them as images that you can then use in your Blend project. For more information, see the topics in the sections titled "Live effects", "Slices", and "Export bitmapped file formats" in the Expression Design User Guide. For information about importing images into an Blend project, see Inserting images and art.

You can use the images that you make in Expression Design to define the appearance of any kind of control. For more information, see Import XAML that is exported from Expression Design and Create a user control from existing objects.

See Also

Tasks

Add or modify an object

Concepts

Styling objects