Export as XAML WPF canvas

You can save Microsoft Expression Design artwork as a XAML Windows Presentation Foundation (WPF) canvas document that you can add to a WPF project in Microsoft Expression Blend. A canvas document in a WPF project can be the startup XAML page of your project.

For more information about creating a WPF project in Expression Blend, see the Expression Blend User Guide.

Alternatively, you can copy and paste objects from the exported canvas document into another document in your project, or you can convert your canvas objects into buttons or customizable user controls.

You can export to a XAML WPF canvas in the following ways:

  • Export the whole Expression Design document as a single XAML WPF canvas document.

  • Export selected objects as a single XAML WPF canvas document.

  • Export one or more slices of your artwork as individual XAML WPF canvas documents.

  • Export one or more slices of your artwork as individual XAML WPF canvas objects in a single XAML WPF canvas document (container).

  • Export one or more slices of your artwork as individual images in a XAML WPF canvas document (container). This option creates a single XAML WPF canvas document that contains Image objects for each slice. The image files are exported in a subfolder in the same directory as your exported XAML WPF canvas document.

Note

Colors in your exported XAML code are based on RGB and are not color-managed. If you use a custom color monitor profile, the colors you see in Expression Design may differ from those displayed in your final XAML-editing software.

Note

Some text properties are not supported by XAML. For more information, see XAML text support.

To export art as a XAML WPF canvas document

  1. On the File menu, click Export. The Export dialog box displays your artwork in a preview window.

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

    • Whole document   Select this option to automatically export all the artwork in your Expression Design document as single WPF canvas document.

    • Selected objects   Select this option to export only those objects that you selected before you opened the Export dialog box. The objects will be exported as a single WPF canvas document.

    • Slices   Select this option to export slices of your artwork, in multiple output files and formats. Slices are configured before you open the Export dialog box. The preview window changes to display each slice individually so that you can select different export settings for each. You can also use the Slice contents drop-down box to show or hide objects in the slice. For more information, see Working with slices.

  3. In the Export dialog box, in the Format list, select one of the following:

    • XAML WPF Canvas   Select this option if you are exporting the whole document or selected objects as a single XAML WPF canvas document.

    • PNG, JPEG, GIF, TIFF, BMP, or XAML WPF Canvas   If you are exporting slices, select one of these options for each slice. You can set the Format property for multiple slices by using the SHIFT key to select multiple slices before you set the Format property.

      Note

      Expression Design does not assume that you want to export each slice using the same format.

      You can then select the XAML WPF Canvas container from the list next to Container name, and type a name for your XAML WPF canvas document in the Container name text box. If you do not select a container, each slice will be exported in a separate file according to its Format property.

  4. Adjust the following settings:

    • Always name objects   Select this check box to name all objects that are converted from your artwork. This does not include the final canvas container.

    • Placed grouped objects in a XAML layout container   Select this check box to wrap grouped objects in your Expression Design document in individual XAML layout containers, such as canvas objects.

    • Editable TextBlock   Select this option to convert text to TextBlock objects that will be editable after you import the document into Expression Blend.

    • Paths   Select this option to convert all text to Path objects.

    • Rasterize all   Select this option to rasterize (convert into bitmapped images) any live effects that are applied to your artwork. This option helps maintain the appearance of your artwork as much as possible.

    • Convert to XAML effects   Select this option to convert any live effects to XAML-supported effects. Live effects that are not supported in XAML are rasterized.

    Note

    If you are exporting slices as XAML WPF canvas objects, you must set these properties on each slice.

  5. Next to File name, type a name for your XAML WPF canvas document.

    Note

    The File name field is not present if you are exporting slices because the names of the slices are used as the file names for the exported canvas objects.

  6. Next to Location, browse to or type the path of the location where you want the output file to be saved.

  7. Click Export All to export the file or files. If you are exporting slices and you want to export only some of them, you can select multiple slices in the preview window (hold down the SHIFT key), click the drop-down arrow next to Export All, and then click Export Selected Slice(s). Alternatively, if you want to save any changes that you made to the export properties for individual slices without actually exporting the slices, click the drop-down arrow next to Export All and select Save Settings and Close.

    Your XAML WPF canvas document is exported to the path that you specified in the Location property, together with any supporting artwork in a subfolder named <resource_name>_files. When you add the exported document to a WPF project in Expression Blend, Expression Blend automatically imports the <resource_name>_files.

See also

Tasks

Change the document size
Export a slice

Reference

Print and Export options

Other resources

Applying live effects
Working with slices
Bitmapped images

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