Copy a slice to another program

As an exporting shortcut, you can use slices to copy sections of your artwork into other programs such as Microsoft Paint and Microsoft Expression Blend 2. The exporting properties that are set under Edit Slice in the Properties panel determine to which program the slice can be copied.

Note

You can only select slices that are visible and unlocked. Before you follow the procedures in this topic, make sure that the slice is visible Cc375010.3e342e41-0093-4150-afc9-309866723da0(en-us,Expression.10).png and unlocked Cc375010.b553394b-65c8-4b76-8526-5fdfe68fb2c4(en-us,Expression.10).png. Otherwise, you will not be able to copy it. If a slice is hidden, click the Toggle Visibility Cc375010.a708a6c2-5a11-4137-b962-f33438ecf19a(en-us,Expression.10).png button. If the slice is locked, click the Toggle Lock Cc375010.bc1d5d9e-0048-4d04-8efe-c9b571f71a64(en-us,Expression.10).png button.

To copy a slice and paste it as an image into another program

  1. Under Slice Layer in the Layers panel, select a slice.

  2. Under Edit Slice in the Properties panel, set the Format property to a format that is compatible with the destination program. For example, the following formats are compatible for pasting the image into a Microsoft Word document, a graphics program such as Microsoft Paint, or Expression Blend 2:

    • PNG

    • JPEG

    • GIF

    • TIFF

    • BMP

    • WDP

  3. Select the slice, and then, on the Edit menu, click Copy (CTRL+C). The objects in the slice are now in the Clipboard.

  4. In the destination program, click Paste on the Edit menu (CTRL+V).

Cc375010.96180415-0d4e-454f-81be-366ad718e87f(en-us,Expression.10).gifBack to top

To copy a slice and paste it as a XAML object in an Expression Blend document

  1. Under Slice Layer in the Layers panel, select a slice.

  2. Under Edit Slice in the Properties panel, set the Format property to one of the following formats:

    • XAML Silverlight Canvas   For pasting into a Microsoft Silverlight 1.0 project that is open in Expression Blend 2.

    • XAML WPF Canvas   For pasting into a Windows Presentation Foundation (WPF) project that is open in Expression Blend 2.

  3. Under Edit Slice in the Properties panel, set the Place grouped objects in a XAML layout container check box to one of the following:

    • True (checked)   To paste each grouped object in your slice into individual layout containers in the Expression Blend 2 document.

      After the slice is pasted into Expression Blend with the option checked

      Cc375010.d8ad9964-a240-469a-b08e-7e635142a133(en-us,Expression.10).png

    • False (cleared)   To paste all the objects in your slice into a single, new container in the Expression Blend 2 document.

      After the slice is pasted into Expression Blend with the option cleared

      Cc375010.fad20d54-fca5-4f3e-8938-a1005c0f7813(en-us,Expression.10).png

  4. Select the slice, and then, on the Edit menu, click Copy. The objects in the slice are now in the Clipboard, using the format that you selected in the Format property.

  5. In a project open in Expression Blend 2, open the destination document in Design view.

  6. Under Objects and Timeline, double-click the container into which you want to paste your slice.

  7. On the Edit menu, click Paste (CTRL+V).

Cc375010.96180415-0d4e-454f-81be-366ad718e87f(en-us,Expression.10).gifBack to top

To copy a slice and paste it as a resource in Expression Blend

  1. Under Slice Layer in the Layers panel, select a slice.

  2. Under Edit Slice in the Properties panel, set the Format property to XAML WPF Drawing Brush.

  3. Select the slice, and then, on the Edit menu, click Copy. The objects in the slice are now in the Clipboard, using the format that you selected in the Format property.

  4. In a WPF project open in Expression Blend 2, in the Resources panel, right-click the location where you want the slice pasted, and then click Paste. For example:

    • If you want the brush resource available to paint any object in the application, right-click App.xaml or any existing resource dictionary file, and then click Paste.

    • If you want the resource to be available only to the active document, right-click the name of the active document, and then click Paste.

    Your slice is added to the Expression Blend 2 project as a brush resource.

  5. To apply your new brush resource to an object on the artboard in Expression Blend 2, you can drag the resource onto an object. A shortcut menu appears that gives you the following options:

    • Apply the resource to one of the brush properties of the object (for example, the Fill property)

    • Create a new object by using the brush resource (for example, a Rectangle object)

    • Copy the drawing brush to the artboard so that you can modify it (Copy DrawingBrush to Canvas)

    Cc375010.8b5abd8f-a085-48e0-a1c7-c722ebc54d43(en-us,Expression.10).png

    For more information about how to use resources, see the topics titled "Apply a resource" and "Create or modify a drawing brush resource" in the Expression Blend 2 User Guide.

    Note

    If you try to paste a slice that has the same name as a resource that already exists in the Expression Blend 2 project, an error message will remind you to change the name of the slice or the resource before you try to paste again.

Cc375010.96180415-0d4e-454f-81be-366ad718e87f(en-us,Expression.10).gifBack to top

To copy the contents of a slice

  • To copy a slice without having to make the Format property compatible with the destination program, select the slice, click Select Slice Contents on the Select menu, and then click Copy on the Edit menu (CTRL+C).

    When you paste your slice, it is pasted as an image into programs such as Microsoft Word or Microsoft Paint, or it is pasted as XAML objects into Expression Blend 2.

    This procedure is more generic than the first and second procedure in this topic, but it does not work for pasting a resource into Expression Blend 2, and it requires more steps.

Cc375010.96180415-0d4e-454f-81be-366ad718e87f(en-us,Expression.10).gifBack to top

See also

Concepts

Export a slice

Modify slice properties

Change what appears in a slice