Share via


Add or modfiy an object

You can add an object to the artboard by selecting a control or a tool in the Tools panel or in the Assets panel, and then drawing the object on the artboard by using your mouse. You can also select a styled or custom control from the Assets panel, drag a styled control from the Resources panel, or drag resources from the Resources panel onto an existing object on the artboard to apply the resource to one of the properties of the object.

Note

The following procedures assume that you have a project open in Design view in Blend for Visual Studio 2012.

To add an object by using the Tools panel

  • Do one of the following:

    • Double-click the icon for a control (such as Rectangle , Grid , Button , or TextBlock ) in the Tools panel. The object is inserted into the upper-left corner of the artboard at a default width and size.

    • Select the icon of the control in the Tools panel and use your mouse to draw the control on the artboard.

To add an object by using the Assets panel

  1. Open the Assets panel by clicking Assets  in the Tools panel.

  2. Do one of the following:

    • To add a control   Under Controls, click All, select a control from the list, and then use your mouse to draw the control on the artboard.

    • To add a styled control that occurs in a resource dictionary   Under Styles, select the resource dictionary, select a styled control from the list, and then use your mouse to draw the control on the artboard.

    • To add a styled control that is defined in your project   Under Styles, select a styled control from the list, and then use your mouse to draw the control on the artboard.

Note

Styles are created by selecting an existing control and then modifying its style or template. You can also convert any property value in the Properties panel to a resource.

  - **To add a media item**   Under **Media**, select a media item from the list (such as an image or video file), and then use your mouse to draw the control on the artboard.
    

Note

The media file must already be listed in the Projects panel. To add a file to your project, click Add Existing Item on the Project menu. For more information about how to use media files in Blend, see Working with images and art (Windows Phone).

  - **To add a custom or user control**   Under **Project**, select a custom control from the list, and then use your mouse to draw the control on the artboard.
    

Note

If you have added a custom control or user control to your project and you do not see it listed in the Project category, build your project (Ctrl+SHIFT+B).

To add an object by using the Resources panel

  1. From the Resources panel, expand the nodes, and then select a resource.

  2. Drag the resource onto the artboard.

    • If the resource is a style or a template, an instance of the control that the resource was created from is added to the artboard, with the style or template already applied.

    • If the resource is a property value, a pop-up menu appears that gives you the option to create a new object and then apply the style to one of its properties, or apply the style to one of the existing objects on the artboard.

To modify an object

  • Do one of the following:

    • Modify the object by using the on-object handles that appear on the artboard when you move the pointer over the corners of the blue bounding box of the object. These handles enable you to rotate , resize or flip , move , or add a corner radius  to the object. If you do not see the on-object handles, click Selection  or Direct Selection , and then select the object.

      You can change the behavior of the on-object handles in the following ways:

      • To constrain the aspect ratio, hold down the Shift key while you resize or scale.

      • To maintain the position of the center point (instead of maintaining the position of the opposite corner or edge), hold down the Alt key while you resize, scale, or skew.

      • To snap every 15 degrees, hold down the Shift key while you rotate the object.

    • Modify the object by selecting it in the Objects and Timeline panel and then changing the properties in the Properties panel. You can use this method to change the appearance of the object, change its location, or bind data to specific properties on the object.

    • Animate the object.

      For more information, see Animating objects (Windows Phone).

    • Create a template for the object by selecting the object in the Objects and Timeline panel, and then selecting Edit Style or Edit Template under the Object menu.

      For more information, see the following topics:

See Also

Tasks

Copy, cut, paste, or delete an object