Modify the appearance of an object by using brushes
You can change the appearance of the objects that you draw on the artboard by applying a brush and then modifying the Fill, Stroke, and OpacityMask properties of the brush.
Brushes appear in the Brush category of the Properties panel. The Fill property refers to the appearance of the inside of the rectangle object. The Stroke property refers to the border around the rectangle, and the OpacityMask property can be used to make part of the rectangle object transparent. The properties displayed in the Brush category change depending on the type of object selected.
To modify the fill of a rectangle
Click Selection in the Tools panel and then click the rectangle on the artboard.
Sugerencia You can also select the rectangle by selecting the Rectangle object in the Objects and Timeline panel.
In the Properties panel, under Brushes, select Fill.
Under Brush, select Solid Color Brush .
In the color Editor, select the color that you want to apply to the rectangle. You can use the RGB value, the 16-bit hexadecimal color code, or the color picker to choose the color that you want.
To modify the stroke of a rectangle
Click Selection in the Tools panel and then click the rectangle on the artboard.
Sugerencia You can also select the rectangle by selecting the Rectangle object in the Objects and Timeline panel.
In the Properties panel, under Brush, select Stroke.
Under Brush, select Solid Color Brush .
In the color Editor, select the color that you want to apply to the stroke. You can use the RGB value, the 16-bit hexadecimal color code, or the color picker to choose the color that you want.
In the Appearance category, modify the StrokeThickness.
For more information, see Apply a solid color or gradient brush to an object's fill or stroke.
You can also modify the corners of the stroke by adjusting the Stroke properties.
For more information, see the "Strokes" section of Setting colors, brushes, and masks.
To modify the opacity mask of a rectangle
Click Selection in the Tools panel and then click the rectangle on the artboard.
Sugerencia You can also select the rectangle by selecting the Rectangle object in the Objects and Timeline panel.
In the Properties panel, under Brush, select OpacityMask.
Under Brush, select Gradient brush .
In the color Editor, define at least one gradient stop with an Alpha value of less than 100 percent. In this example, the Alpha value of the right gradient stop is set to 50%.
For more information, see Create an opacity mask.
To add a gradient to a rectangle
Click Selection in the Tools panel and then click the rectangle on the artboard.
In the Properties panel, under Brushes, select Fill, Stroke, or OpacityMask.
Under Brush, select Gradient brush .
In the Editor, you can change the color of each of the gradient stops on the color bar by selecting the gradient stop, and then clicking the color that you want inside the color picker.
A gradient brush applied to the Fill property of a rectangle
You can add other gradient stops by clicking the gradient bar. You can also change from a linear gradient to a radial gradient by clicking the buttons under the gradient bar.
To remove gradient stops, drag them off the gradient bar.
Sugerencia When Gradient brush is selected, the Color eyedropper in the color Editor becomes a Gradient eyedropper . You can drag the Gradient eyedropper over an existing gradient, either inside Expression Blend or on the desktop, to apply the gradient to the existing object.
To modify a gradient applied to a rectangle
With the Fill, Stroke, or OpacityMask property of the rectangle object still selected, select Gradient in the Tools panel.
Sugerencia With the object selected on the artboard, press G to select the Gradient tool.
A blue arrow appears on the artboard showing the direction of the gradient brush and its endpoints.
Linear gradient arrow
Radial gradient arrow
[!NOTA]
If you do not see a blue arrow, you might not have the rectangle object selected, or you might not have a brush property selected. The Gradient tool will only appear if a gradient brush is selected.
Use your mouse to move the endpoints of the blue arrow to modify the gradient. You can lengthen or shorten the arrow, rotate the arrow, or move the center point of the arrow to modify the gradient.
Modify a linear gradient
Modify a radial gradient
In the Properties panel, under Brushes, click the gradient bar to add more gradient stops and change their colors. You can also click the blue arrow on the artboard to add gradient stops or double-click to edit the gradient.
To transform a brush applied to an object
With the rectangle selected on the artboard, select Brush Transform in the Tools panel.
Sugerencia With the object selected on the artboard, press B to select the Brush Transform tool.
A blue arrow adorner appears around the rectangle on the artboard.
With the Brush Transform tool selected, do one or more of the following:
To move a brush, drag anywhere inside the object. This corresponds to the Translate tab on the RelativeTransform box in the Properties panel.
To rotate a brush, put your pointer outside any corner of the bounding outline around the object and drag when your pointer changes to a rotation handle . This corresponds to the Rotate tab on the RelativeTransform box in the Properties panel.
To rescale either a tile brush or radial gradient brush, put your pointer on any handle on the side or corner of the object, and then drag. This corresponds to the Scale tab on the RelativeTransform box in the Properties panel.
To skew a brush, put your pointer outside a side handle and drag when your pointer changes to skew handles . This corresponds to the Skew tab on the RelativeTransform box in the Properties panel.
The Brush Transform tool can also be used with the Tile brush .
Next steps
You can design the user interface of your application by adding more objects to the main document (typically Window1.xaml). For more information, see Add or modify an object, Draw a free-form path, Draw a curve, Insert an audio or video file into the active document, and Import 3D content.
You can reuse a brush or other property value by converting it to a resource and applying it to another property. For more information, see Convert an image to a reusable ImageBrush resource.
You can move, rotate, scale, and perform other transformations on objects on the artboard. For more information, see Reposition or translate an object, Resize or scale an object, Rotate an object, Skew an object, Flip an object, or Change the center point of an object.
You can animate your objects. For more information, see Create a simple animation, Create, modify, or delete a motion path, Animate the points on a path or clipping path.
Vea también
Tareas
Change the transparency of an object
Change the center point of an object
Make or release a compound path
Apply, modify, or remove a clipping path
Change the layering order of objects