Convert an image to a reusable brush resource (Windows Phone)

An ImageBrush is a type of TileBrush that uses an image as its source. You can create an image brush resource from an image file, and then apply that brush resource to another object.

To convert an existing image on the artboard into a brush resource

  1. Add an image file to your project by clicking AddExistingItem on the File menu, browsing to your image file, and then clicking Open.

  2. In the Projects panel, double-click the image file to add it to the artboard. Alternatively, add an Image from the Assets panel to the Objects and Timeline panel, and then set its Source property to the image file in the Properties panel under the Common category.

    The image file is added as an Image object that you can resize and modify on the artboard.

  3. In the Objects and Timeline panel, select the Image object that you created in the previous step.

  4. On the Tools menu, point to Make Brush Resource, and then click Make ImageBrush Resource. An image brush can paint an area with an image. It is a type of tile brush that defines its content as an image.

    The Create ImageBrush Resource dialog box opens.

  5. Under Name (Key), enter a name for your image 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 the option where you want the image 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 (Page: <no name>).

    • 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.

  7. Click OK to close the dialog box and create the resource. The original image remains in your document.

  8. You can view the new image brush resource in the Resources tab, from which you can drag it onto another object on the artboard and select the brush property to apply it to.