Partilhar via


Change the margins of an element

Margins in Microsoft Expression Blend determine the amount of empty space that is around an object on the artboard. For example, margins specify the amount of space between the outside edges of an element and the boundaries of a grid panel that contains the element. Or, margins specify the amount of space between objects that are contained in a stack panel.

To change the margins of an element

  1. Select the object for which you want to change the margins.

  2. Under Layout in the Properties panel, change the value (in pixels or, device-independent units which are approximately 1/96 inch) for any of the Margin properties (Top, Left, Right, or Bottom). Alternatively, you can move your mouse pointer over the margin property's text box, and then click and drag your pointer when the numerical adjust Cc295306.1ac1b6df-d5d6-4ad9-aba5-0712dc9a9036(en-us,Expression.10).png cursor appears so that you can scroll through values and see the changes reflected on the artboard.

    Note

    If your object does not change in size, the Width and Height properties might set to explicit values.

    Tip

    You can also set margins for an element relative to its parent grid panel by clicking the margin (knot) adorners that appear around the element on the artboard when the element is selected and is in Grid layout mode. (For information about switching between canvas layout mode and grid layout mode, see Grid panel.)

    If a margin adorner is open, vertically Cc295306.dac083fe-54cd-4cdc-973a-bea351080175(en-us,Expression.10).png or horizontally Cc295306.7eeec52f-8610-416e-a0f2-79c7bf117e77(en-us,Expression.10).png, that margin is not set.

    If a margin adorner is closed, vertically Cc295306.8523b4c7-be0f-4624-961a-6adb66120049(en-us,Expression.10).png or horizontally Cc295306.95a79778-cb78-400c-9f4f-5f6fc5a02eb1(en-us,Expression.10).png, that margin is set.

    Resizing the grid panel during run time will leave any elements in place where the margins aren't set. Elements that are bound to a margin will move with the margin as the grid panel is resized.