Compartilhar via


Change the design-time size of a user control

This page applies to WPF and Silverlight 2

Expression Blend 2 now makes it easier for you to modify auto-sized user controls. In earlier versions of Expression Blend, if you opened a user control where the Height and Width properties of the root node were set to Auto, the object would be displayed on the artboard with a default height and width of 20. Now, you can use new resizing handles that appear on the artboard when you select the root node of your user control to set a design-time height and width. These values do not affect the size of the user control in the document where it is inserted, nor do they affect the runtime size of the control.

To change the design-time size of a user control

  1. Open the user control by doing one of the following things:

    • Right-click a user control that you have inserted into another document, and then select Edit Control.

    • In the Project panel under Files, double-click the name of your user control file.

    The user control opens on the artboard for editing.

  2. Select the Selection tool Cc295064.2ff91340-477e-4efa-a0f7-af20851e4daa(en-us,Expression.10).png from the Toolbox.

  3. Under Objects and Timeline, select the root node (typically User Control).

  4. On the artboard, move your pointer over one of the design-time resizing handles until the pointer changes Cc295064.5919d652-dc01-47d1-889f-ae90cfab00fe(en-us,Expression.10).png and displays the message Adjust to modify the design-time size (or height or width), and then drag the handle.

    Cc295064.52deccaf-93e2-46dd-b9a9-d77584f27177(en-us,Expression.10).png

See also

Concepts

Add a new or existing project to a solution

Create a control from existing objects