Partilhar via


Reposition or translate an object

Repositioning and translating are two different ways to move an object in Blend for Visual Studio 2012:

  • Repositioning an object changes only the alignment of the object, and margins (if the container is a Grid object), or the top and left properties (if the container object is a Canvas object).

  • Translating an object applies a transform to the object that moves the object from the initial X, Y, and Z (three-dimensional objects only) coordinates to the destination coordinates. The result is an offset from the original position. Offsetting objects is useful when you have more than one object in the same position on the artboard and you want to distribute the objects in a particular direction. For example, if you have a stack of circular shapes that you want to span out horizontally in a straight line on the artboard, you can specify values in increasing increments for the X property on the Translate tab under Transform in the Properties panel.

While moving an object, you can optionally have it snap to grid lines, snap lines, or base lines. For more information, see Turn snapping on or off.

To reposition an object

  1. Select the object that you want to reposition, using either the Selection tool JJ170185.2ff91340-477e-4efa-a0f7-af20851e4daa(pt-br,VS.110).png or the Direct Selection tool JJ170185.6dd6571f-c116-451d-8dd2-1f88b8406362(pt-br,VS.110).png, by clicking the object on the artboard. To select more than one object, hold down the Ctrl key.

  2. Do one of the following:

    • In the Properties panel, under Layout, enter values in the HorizontalAlignment, VerticalAlignment, or Margin boxes, or any combination. These property changes might make it necessary to change the values in the Height or Width boxes also.

    • On the artboard, move your mouse over the object until the pointer changes to an arrow with a smaller four-directional arrow JJ170185.eff911a7-b891-4315-a86c-cc4cd088e647(pt-br,VS.110).png, and then drag the pointer to move the object. Hold down the Shift key if you want to constrain the movement to the X or the Y plane as you reposition it.

To translate or offset an object

  1. Select the object that you want to offset, using either the Selection tool JJ170185.2ff91340-477e-4efa-a0f7-af20851e4daa(pt-br,VS.110).png or the Direct Selection tool JJ170185.6dd6571f-c116-451d-8dd2-1f88b8406362(pt-br,VS.110).png, by clicking the object on the artboard. To select more than one object, hold down the Ctrl key.

  2. In the RenderTransform category under Transform in the Properties panel, click TranslateJJ170185.962807da-746d-41bd-878c-0f89500f3907(pt-br,VS.110).png.

    For information about the RenderTransform and LayoutTransform transform categories, see Moving and transforming objects.

  3. Enter the desired values, in pixels (or, device-independent units that are approximately 1/96 inch), in the boxes for the X, Y, and Z (only for three-dimensional objects) properties.

    ObservaçãoObservação

    If you are modifying your object in a trigger within a style, it is not possible to scale an object freely on the artboard by using handles on the bounding box of the object. Instead, set specific values in the Properties panel.

Consulte também

Tarefas

Turn snapping on or off