Partilhar via


Convert objects into a reusable DrawingBrush resource

JJ170638.bf9c77b1-ba7a-4f3b-8380-d05728d208d1(pt-br,VS.110).png

You can convert existing objects on the artboard into a drawing brush resource that you can then apply to other objects. A drawing brush can include shapes, text, video, images, or other types of drawings as defined by the Drawing class.

For more information about the Drawing class, see Drawing class on MSDN.

To create a drawing brush resource

  1. In the Objects and Timeline panel, hold the Ctrl key when you select all the objects that you want to use to define the appearance of the new drawing brush. Alternatively, you can use the Selection tool JJ170638.2ff91340-477e-4efa-a0f7-af20851e4daa(pt-br,VS.110).png when you hold the Ctrl key to select the objects on the artboard.

    ObservaçãoObservação

    Only objects that are contained in the same parent object can be grouped into a new drawing brush.

  2. On the Object menu, click Group Into, and then select a layout panel in which to group the objects. For example, select the Grid layout panel to group the objects into a grid.

    ObservaçãoObservação

    Only a layout panel can be selected to convert into a drawing brush.

  3. Select the new layout panel.

  4. On the Tools menu, click Make Brush Resource, and then click Make DrawingBrush Resource.

    The Create DrawingBrush Resource dialog box appears.

  5. Under Name (Key), enter a name for your drawing brush resource. This is the name by which other objects can reference the resource, thereby applying the resource to themselves.

  6. Under Define in, select one of the following options where you want the drawing brush resource to be defined:

    • To make the resource available to any document in your application, select Application.

    • To make the resource available only to the current document, select This document (Window: Window).

    • To make the resource available only to the object from which you created the resource or its child objects, select This document (object).

    • To define the resource in a resource dictionary file that you can reuse in other projects, select an existing Resource dictionary, or click the New button to create a new resource dictionary.

  7. Click OK to close the dialog box and create the resource. The original objects remain intact in your document.

    You can view the new drawing brush resource in the Resources tab, from where you can drag it onto another object on the artboard and select the brush property to apply it to. For more methods of applying a resource, see Apply a tile brush to an object's fill or stroke.

To edit an existing drawing brush resource

  1. In the Resources panel, locate your drawing brush resource by expanding the nodes until you see the drawing brush that you want to modify.

    ObservaçãoObservação

    To determine whether a resource is a drawing brush (and not a simple brush resource or visual brush resource), pause your mouse pointer over the resource to open a pop-up identifier that displays the words DrawingBrush Resource.

  2. Drag the drawing brush resource onto the artboard, and then, from the pop-up menu, select Copy DrawingBrush to Canvas.

    JJ170638.496874e2-379b-428a-a9bb-7264dc496036(pt-br,VS.110).png

    A Canvas layout panel is added to the artboard that contains the objects that you used to create your drawing brush.

  3. Modify the objects in the canvas layout panel to change your drawing brush resource. You can also add or remove new objects from the canvas layout panel.

  4. When you finish modifying your drawing brush, right-click the canvas layout panel, and then select one of the following options:

    • Copy into Source DrawingBrush   Updates the drawing brush resource, but leaves the objects on the artboard. Use this option if you want to continue to modify your drawing brush resource, but preserve your intermediate changes.

    • Move into Source DrawingBrush   Updates the drawing brush resource and removes the objects from the artboard.