Import XAML that is exported from Expression Design

You can save your Microsoft Expression Design 2 artwork as a XAML file that you can use in Microsoft Expression Blend 2. This is useful if you want to use the artwork in animations, convert the artwork into user interface (UI) elements such as a background image, and so on.

To export art from Expression Design

  1. Open an art file in Expression Design 2. (You can open Samples from the Help menu.)

  2. If you want to export slices, select the Slice tool from the Toolbox, draw a rectangle around the area of your artwork that you want to export, and then, under Edit Slice in the Properties panel, set the slice properties (such as the Name). For more information about slices, see the "Create and export slices" topic in the Expression Design 2 User Guide (F1).

  3. Click Export on the File menu. The Export dialog box appears.

  4. Under Items to Export, select one of the following:

    • Whole document   Exports all the art in the document.

    • Selected objects   Exports only those items selected on the artboard.

    • Slices   Exports only the slices that you made. You can optionally change the properties for each slice that is displayed.

  5. Next to Format, select one of the following options:

    • XAML Silverlight Canvas   Exports a single XAML file that includes all the art represented as objects in a canvas layout panel. You can import this XAML file into a Microsoft Silverlight 1.0 project in Expression Blend 2 to use as a stand-alone document (your starting XAML file, or a XAML file that is loaded programmatically), or to copy and paste objects into another XAML document.

    • XAML WPF Drawing Brush   Exports a resource dictionary that includes all the art represented as drawing brush resources. You can import this XAML file into a Windows Presentation Foundation (WPF) project in Expression Blend 2 and then apply the resources to brush properties of the objects in your project.

      Tip

      Make sure the names that you select for your drawing brush resources differ from any resources in the Expression Blend 2 project that will use the exported files.

    • XAML WPF Canvas   Exports a single XAML file that includes all the art represented as objects in a canvas layout panel. You can import this XAML file into a Windows Presentation Foundation project in Expression Blend 2 to use as a stand-alone document (your startup XAML file, or a XAML file that is loaded programmatically), or to copy and paste objects into another XAML document. You can also open this file in Design view in Expression Blend 2, right-click any object or objects, and then make a button or a user control out of the objects by selecting the options on the Tools menu.

    Note

    If you decided to export Slices, you must select each slice in the viewer to set the export properties for those slices. You can select different formats for each slice. Each slice is exported to a separate file.

  6. Set other properties that you prefer, such as making the Text objects editable after they are imported into Expression Blend 2. For more information about the properties in this dialog box, see the "XAML" topic in the Microsoft Expression Design 2 User Guide.

  7. At the bottom of the dialog box, next to Location, type the path of the folder where you want the file exported. Also set the following options:

    • If you decided to export the Whole document or Selected objects, then also enter a name for your file.

    • If you decided to export Slices, then you can optionally select a layout panel to contain all the objects.

  8. Click Export All to export your file (or files).

Cc294508.7e183f1f-37d8-4dcb-980c-19a5d61ca087(en-us,Expression.10).gifBack to top

To import the art into Expression Blend

  1. In an open project in Expression Blend 2, click Add Existing Item on the Project menu.

  2. In the Add Existing Item dialog box, browse to your exported XAML file (or files), select it, and then click Open.

    Note

    Only an exported XAML Silverlight Canvas can be imported into a Silverlight 1.0 project.

    The file is added under Files in the Project panel. If you exported any of your art as a XAML WPF Drawing Brush, it will also appear in the Resources panel.

  3. Do one of the following to add the imported assets to the artboard:

    • If you selected the XAML Silverlight Canvas option, you can add to the document, use the document as the startup page for your application (see Change the startup page of a Silverlight project in Expression Blend 2) or to copy and paste objects into another XAML document.

    • If you selected the XAML WPF Drawing Brush option, apply the resources to brush properties of the objects in your project. For example, you can drag a DrawingBrush resource onto to a TextBlock object and set it as the Background property.

      Cc294508.496874e2-379b-428a-a9bb-7264dc496036(en-us,Expression.10).png

      For more information about how to apply resources, see Apply or remove a resource.

      Tip

      Make sure that the names of your imported drawing brush resources differ from resources elsewhere in your Expression Blend 2 project. You can rename resource objects in the Resources panel by right-clicking the name and then selecting Rename.

    • If you selected the XAML WPF Canvas option, you can add to the document, use the document as the startup page for your application (see Set a startup document for your project), or to copy and paste objects into another XAML document. You can also open this file in Design view in Expression Blend 2, right-click any object or objects, and then make a button (see Make an object into a button) or a user control (see Create a control from existing objects).

Cc294508.7e183f1f-37d8-4dcb-980c-19a5d61ca087(en-us,Expression.10).gifBack to top

See also

Concepts

Import a Silverlight 1.0 site from Expression Encoder 2

Modify a Silverlight template for Expression Encoder 2 in Expression Blend