Slices overview

A feature in Microsoft Expression Design lets you create sections, or slices, of objects in your document. Slices let you export a part of your artwork instead of the whole piece. For example, if you use Expression Design to create a mockup of a user interface for an application, you can slice up each part of the user interface and export the parts as XAML files that will be converted into user controls in Microsoft Expression Blend. As another example, you can create multiple slices that display the same parts of your artwork, but configure different export properties on each slice to export the artwork in multiple file formats (.png, XAML, and so on).

Each slice includes all objects, layers, and live effects in the slice area, but you can decide to hide any one of these in the slice. For more information, see Create or delete a slice.

Creating a slice

Creating a slice.

Slices appear as layers under Slice Layer in the Layers panel. When you select a slice, you can view the slice properties under Edit Slice in the Properties panel. The properties specify the settings that are used when you export or copy the slice. For more information, see Modify slice properties.

Note

Under Slice Layer in the Layers panel, make sure that the slice is visible Cc375008.3e342e41-0093-4150-afc9-309866723da0(en-us,Expression.40).png and unlocked Cc375008.b553394b-65c8-4b76-8526-5fdfe68fb2c4(en-us,Expression.40).png. Otherwise, you will not be able to select or modify the slice. If a slice is hidden, click the Toggle Visibility Cc375008.a708a6c2-5a11-4137-b962-f33438ecf19a(en-us,Expression.40).png button. If the slice is locked, click the Toggle Lock Cc375008.bc1d5d9e-0048-4d04-8efe-c9b571f71a64(en-us,Expression.40).png button.

The properties of a slice

The Edit Slice dialog box.

You can perform many of the same operations on slices as you can on layers. For example, you can hide slice boundary lines when you want to continue to work with the objects on the artboard. Additionally, you can copy slice properties, or use the Select Slice Contents command to select both the slice and its contents for pasting to other documents. For more information, see Move, cut, or copy a slice.

Slices listed under Slice Layer above the layers of objects on the artboard

Slice layers in the Layers panel.

When you add an object to the artboard, if all or a part of the object is within the boundary of an existing slice, the slice is automatically updated. Slices are also automatically updated when you delete objects from the artboard. Additionally, you can resize the slice boundaries automatically to fit content. As an alternative to adding and deleting from the artboard, however, you can just hide layers in a slice. For more information, see Change what appears in a slice.

When you create, move, or resize a slice, you can turn on snapping so that the boundary lines of your slice snap to (or pull towards) existing slice boundary lines. This is useful if you are trying to create slices of your artwork that cover every pixel without any space between the slices. For example, if your artwork represents a user interface where the position of the objects must stay the same when the sliced objects are imported into a program such as Expression Blend, slice snapping makes sure that you create slices around those objects that account for every pixel. For more information, see Turn slice snapping on or off.

Slices let you export your artwork in organized pieces, and in various file formats. Additionally, you can copy slices from the Expression Design workspace and paste them into another open document or another program such as Expression Blend, Microsoft Word, or Microsoft Paint. For more information, see Copy a slice to another program and Export a slice.

Overlapping slices

A common problem is that objects are often stacked on top of one another in a manner that makes it difficult to use traditional slicing techniques. In Expression Design you can choose specific objects within a slice for export. For example, if you don't want the background for a particular slice exported, just turn off the background for that specific slice. For more information, see Export a slice.

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