Export (0) Print
Expand All

Create a brush or color resource

You can create a reusable brush or color that you can then apply to other objects. Resources have an advantage over copying and applying attributes because you can change the resource in one location. When you do this, all the objects that use the resource are instantly updated.

Cc294725.alert_note(en-us,Expression.30).gifNote:

You have many ways to create a resource in Microsoft Expression Blend. This topic covers only how to create brush and color resources, but you can create a resource from most properties. Additionally, you can create a style or template resource that you can apply to a control, instantly changing the appearance or behavior of the control. For more information about how to create additional resource types, see Creating reusable resources. You can see all the resources that are used in your project in the Resources panel.

  1. If you do not already have an object on the artboard with a brush property that you want to convert to a resource, you can select Ellipse Cc294725.8938cfdf-9b75-4a33-bc88-b0636e114a0d(en-us,Expression.30).png from the Tools panel, and draw an ellipse on the artboard. The properties panel will display the properties for the new ellipse object, with the Fill property selected under Brushes.

  2. Under Brushes in the Properties panel, click the Solid color brush tab Cc294725.3a66ec96-47bb-47fc-8876-6b9456feec3a(en-us,Expression.30).png, the Gradient brush tab Cc294725.91fb0c61-7b3b-4ae7-8a59-760e625e3bd7(en-us,Expression.30).png, or the Tile brush tab Cc294725.14623a18-70ab-450f-af01-ae9902d60e4d(en-us,Expression.30).png to begin setting properties for your brush.

  3. When you are ready to save the brush, click Advanced property options Cc294725.12e06962-5d8a-480d-a837-e06b84c545bb(en-us,Expression.30).png next to the brush property (such as the Fill or Background property), and then click Convert to New Resource.

    The Create Brush Resource dialog box appears
    Cc294725.092a1fec-f5b5-427c-a51e-aae1f6a1eee2(en-us,Expression.30).png
  4. In the Create Brush Resource dialog box, enter a name (key) for your new resource, select where you want the resource to be defined (such as at the application-level, document-level, object-level, or as a part of a resource dictionary), and then click OK.

  5. You can view and modify the brush resource that you created in the Resources panel.

    Viewing and modifying a brush resource in the Resources panel
    Cc294725.64136c65-52bc-4225-a948-b1171634baca(en-us,Expression.30).png

  1. Select the object to which you want to apply the brush resource.

  2. Under Brushes in the Properties panel, select the brush property that you want to change.

  3. Click the Brush resources tab Cc294725.415db740-5a54-48d2-8678-245ccfa7ee8b(en-us,Expression.30).png.

  4. Under Local Brush Resources, select the brush resource that you want to apply to the object.

    Setting the Fill property of the selected object to the Brush1 resource
    Cc294725.af28e5e4-4861-45ac-b02d-e65386520ed7(en-us,Expression.30).png
    Cc294725.alert_note(en-us,Expression.30).gifNote:

    You have other ways to apply a resource to an object, such as dragging the resource onto the artboard or using the Advanced property options drop-down menu Cc294725.12e06962-5d8a-480d-a837-e06b84c545bb(en-us,Expression.30).png. For more information, see Apply or remove a resource.

  1. If you do not already have an object on the artboard with a color property that you want to convert to a resource, you can select Ellipse Cc294725.8938cfdf-9b75-4a33-bc88-b0636e114a0d(en-us,Expression.30).png from the Tools panel, and draw an ellipse on the artboard. The Properties panel will display the properties for the new ellipse object, with the Fill property selected under Brushes.

  2. Under Brushes in the Properties panel, click the Solid color brush tab Cc294725.3a66ec96-47bb-47fc-8876-6b9456feec3a(en-us,Expression.30).png or the Gradient brush tab Cc294725.91fb0c61-7b3b-4ae7-8a59-760e625e3bd7(en-us,Expression.30).png. Select a color in the color editor. If you are modifying a Gradient brush Cc294725.91fb0c61-7b3b-4ae7-8a59-760e625e3bd7(en-us,Expression.30).png, you can select a color for each gradient stop Cc294725.a3c9e482-e99b-4504-8a02-9507487d1791(en-us,Expression.30).png.

    Cc294725.alert_tip(en-us,Expression.30).gifTip:

    A Color eyedropper Cc294725.2ab2d2fb-3478-4b33-87fb-3cdeb9df4d52(en-us,Expression.30).png appears in the lower-right corner of the color Editor when you are modifying a Solid color brush Cc294725.3a66ec96-47bb-47fc-8876-6b9456feec3a(en-us,Expression.30).png or a gradient stop on a Gradient brush Cc294725.91fb0c61-7b3b-4ae7-8a59-760e625e3bd7(en-us,Expression.30).png. With this eyedropper selected, you can grab a color sample from anywhere on your desktop and apply it to the selected brush. When you modify a Gradient brush Cc294725.91fb0c61-7b3b-4ae7-8a59-760e625e3bd7(en-us,Expression.30).png, you can select the Gradient eyedropper Cc294725.2ab2d2fb-3478-4b33-87fb-3cdeb9df4d52(en-us,Expression.30).png and drag a line across a sample of a color anywhere inside the Microsoft Expression Blend application window to apply it to the brush. You can press the ESC key at any time to cancel out of the eyedroppers.

  3. When you are ready to save the color, click Convert color to resource Cc294725.6bf68607-add8-4d87-b6f4-100c8f05dd17(en-us,Expression.30).png.

    Converting a color to a resource
    Cc294725.89203705-cf66-46e0-b153-52a23cd744f7(en-us,Expression.30).png
    The Create Color Resource dialog box appears
    Cc294725.6bff8b19-3cd5-41a0-bbf9-ff65532d5aae(en-us,Expression.30).png
  4. In the Create Color Resource dialog box, enter a name (key) for your new resource, select where you want the resource to be defined (such as at the application-level, document-level, object-level, or as a part of a resource dictionary), and then click OK.

  5. You can view and modify the color resource that you created in the Resources panel, just as you can view and modify a brush resource.

  1. Select the object to which you want to apply the color resource.

  2. Under Brushes in the Properties panel, select the brush property that you want to change.

  3. Click the Color resources.

  4. Under Local Color Resources, select the color resource that you want to apply to the object.

    Setting the Fill property of the selected object to the Color1 resource
    Cc294725.5cb88f90-c17a-4dad-be87-b6be7d74f410(en-us,Expression.30).png

Community Additions

ADD
Show:
© 2014 Microsoft