XAML WPF canvas
You can save Microsoft Expression Design artwork as a XAML Windows Presentation Foundation (WPF) (WPF) canvas document that you can add to a Windows Presentation Foundation (WPF) project in Microsoft Expression Blend. A canvas document in a WPF project can be the startup XAML page of your project, or 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.
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.
Some text properties are not supported by Silverlight 1. For more information, see XAML text support.
To export art as a XAML WPF canvas document
On the File menu, click Export. The Export dialog box displays your artwork in a preview window.
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.
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.
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.
Adjust the following settings:
If you are exporting slices as XAML WPF canvas objects, you must set these properties on each slice.
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 it can.
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.
Next to File name, enter a name for your XAML WPF canvas document.
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.
Next to Location, browse to or enter the path for the location where you want the output file to be saved.
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 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 folder also.
To import your XAML WPF canvas into an Expression Blend project
In an open WPF project in Expression Blend, click Add Existing Item on the Project menu.
In the Add Existing Item dialog box, browse to your exported XAML WPF canvas file, select it, and then click Open. The file is added under Files in the Project panel. If the document includes exported image files in a <resource_name>_files folder, that folder is imported also.
Under Files in the Project panel, double-click the file name to open the document. You can copy and paste objects from your imported canvas document into the starting XAML document for your WPF project, or you can right-click the document name under Files, and then select Startup to make your imported canvas document the startup document for your WPF application.
For information about how to convert your canvas objects into buttons or user controls, see the "Make an object into a button" and "Create a control from existing objects" topics in the Expression Blend User Guide.
Make sure that the names of your objects differ from other objects in your Expression Blend project. If naming conflicts occur, they will be listed in the Results panel (press F12 if you do not see the Results panel). Double-click an error to be taken to that line of XAML so that you can change the object's name.