Search code examples
expression-blend

Expression Blend missing snapping guides


I want to use expression blend to snap an element to the halfway line of another object.

Expression Blend only seems to let you snap elements to each others edges.

I'd even like to snap the centre of an object to the centre of a grid also.


Solution

  • I don't think you can do exactly what you want, but Blend has additional snapping support:

    1) You can turn on the "snap grid" and enable "snap to grid lines". These are in the lower left corner of the Artboard.

    Enabling Snap grid and snapping on the Artboard

    2) The settings for snapping are in Window > Options > Artboard

    Snapping settings in Blend

    3) As for snapping to the center, unless these grid lines line up just so, you'l have to use the HorizontalAlignment and VerticalAlignment properties to center the object in the Grid. You can, however, align objects by their centers.

    Select the two objects and use the right click > Align context menu to select the alignment type. Vertical Centers then Horizontal centers will center the two objects in relation to one another.