XAML Silverlight Canvas
You can save Microsoft Expression Design artwork as a XAML Silverlight canvas document that you can add to a Microsoft Silverlight 1 project in Microsoft Expression Blend. A canvas document in a Silverlight 1 project can be the starting XAML page of your project, or you can copy and paste objects from the exported canvas document into another document in your Silverlight 1 project.
You can export to a XAML Silverlight canvas in the following ways:
Export the whole Expression Design document as a single XAML Silverlight canvas document.
Export selected objects as a single XAML Silverlight canvas document.
Export one or many slices of your artwork as individual XAML Silverlight canvas documents.
Export one or more slices of your artwork as individual XAML Silverlight canvas objects in a single XAML Silverlight canvas document (container).
Export one or more slices of your artwork as individual images in a XAML Silverlight canvas document (container). This option creates a single XAML Silverlight 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 Silverlight 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 that are displayed in your final XAML-editing software.
Some text properties are not supported by Silverlight 1. For more information, see XAML text support.
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 Silverlight canvas document.
Selected objects Select this option to export only those objects that you selected before you open the Export dialog box. The objects will be exported as a single Silverlight 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 Silverlight Canvas Select this option if you are exporting the whole document or selected objects as a single XAML Silverlight canvas document.
PNG, JPEG, or XAML Silverlight 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 every slice using the same format.
You can then select the XAML Silverlight Canvas container from the list next to Container name, and enter a name for your XAML Silverlight 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 Silverlight 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.
Next to File name, enter a name for your XAML Silverlight 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 Silverlight 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 Silverlight 1 project in Expression Blend, Expression Blend automatically imports the <resource_name>_files folder also.
In an open Silverlight 1 project in Expression Blend, click Add Existing Item on the Project menu.
In the Add Existing Item dialog box, browse to your exported XAML Silverlight 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 Silverlight 1 project.
For information about how to change the starting XAML document to your imported canvas document, see the "Change the startup page of a Silverlight project" topic 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 name.