Import third-party or custom effects

Microsoft Expression Blend comes with several built-in effects. For other effects, you can import third-party or custom effects into your project, and then apply those effects to the objects on the artboard the same way that you apply the effects that come with Expression Blend.

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

To use custom effects that come in a .dll file

Custom effects are compiled into Windows Presentation Foundation (WPF) or Microsoft Silverlight assembly files (.dll files). After you add a .dll file to your project and build your solution, you can access its contents from the Assets panel under the appropriate category.

  1. Do one of the following:

    • Right-click the name of your project in the Projects panel, and then click Add Reference.

    • On the Project menu, click Add Reference.

  2. In the Add Reference dialog box, browse to the location of the .dll file that contains effects, select the .dll file, and then click Open.

    The .dll file is not added to your project, but a reference to it is added in the References node in the Projects panel.

    The reference to the custom effects file (ShaderEffectLibrary.dll)

    Ee341416.bfec48d4-7325-4920-9a75-ca39c6147cd9(en-us,Expression.40).png

  3. Build your solution (CTRL+SHIFT+B) to incorporate the referenced item and to make the new effects available from the Assets panel in the Effects category.

    Note

    If the .dll file is updated externally, you will have to rebuild your solution in Expression Blend to pick up the changes.

    You can now apply the new effects to any objects on the artboard. For more information, see Applying effects.

    The Effects tab in the Assets panel

    Ee341416.bf1df313-50dd-4d76-8de7-bb0f08546cf7(en-us,Expression.40).png

    The custom effects node in the Select Object dialog box

    Ee341416.b67a3348-79b0-4baa-8b1c-91d599f139ef(en-us,Expression.40).png

To use the custom effects that come from an uncompiled project

For the purposes of this procedure, the WPF ShaderEffectLibrary project is used. You can download the ShaderEffectLibrary project from Windows Presentation Foundation Pixel Shader Effects Library - Home Ee341416.xtlink_newWindow(en-us,Expression.40).png.

  1. If you do not already have the effects build task installed, download the "Shader Effects BuildTask and Templates.zip" file from WPF Futures Ee341416.xtlink_newWindow(en-us,Expression.40).png, expand the file, and double-click the ShaderBuildTaskSetup.msi file.

    The build task will help Expression Blend build the effects library.

  2. Do one of the following:

    • In the Projects panel, right-click the name of your solution, and then click Add Existing Project.

    • On the Project menu, click Add Existing Project.

  3. In the Add Existing Project dialog box, browse to the project file (.csproj or .vbproj) that you want to add, and then click Open. For example, if you are using the ShaderEffectLibrary project, select the ShaderEffectLibrary.csproj file.

    The project is added to your solution. The added project is not copied to your solution folder, but you can view the list of project files in the Projects panel.

  4. Because the effects project builds a .dll file that you want to use in your original project, right-click the name of the original project in the Projects panel, point to Add Project Reference, and then click the name of the effects project that you added.

  5. Build your solution (CTRL+SHIFT+B) to incorporate the effects project and to make the new effects available from the Assets panel in the Effects category.

    Note

    If the effects project is updated externally, you will have to rebuild your solution in Expression Blend to pick up the changes.

    You can now apply the new effects to any objects on the artboard. For more information, see Applying effects.

See also

Tasks

Add or remove a reference

Concepts

Applying effects

Send feedback about this topic to Microsoft. © 2011 Microsoft Corporation. All rights reserved.