Content Index Search

Add an element to a layout panel

To add an element to a layout panel

  1. In your Microsoft® Expression Blend™ project, under Objects and Timeline, double-click the layout panel to which you want to add an element. Notice that a yellow highlight appears around the panel to indicate that it is now the active element.
  2. Do one of the following:
    • On the Toolbox, click one of the drawing tools (for example, Ellipse or Pen ), and then draw an element into the active panel.
    • In the Asset Library Asset Library button, select an element (or control)—for example, select Grid —and then draw the element into the active panel.
Tip If you want a control to use its default size (generally, an optimal size to begin working with), double-click the control when you select it from the Asset Library. The control will be added to the top-left area of the active panel. You can then drag the control to position and otherwise modify it as you want.
Note When you add a child element to specific layout panels or layout elements you may need to observe the following:
  • Dock   When you add child elements to a dock panel, the elements are docked to the left part of the panel by default. The last child element that you add can fill the remaining space in the panel if the LastChildFill property for that element is set to True. By default, this property is set to False. When elements fill up the panel, they are then clipped or hidden by the parent layout container.
  • Stack   In a stack panel, any element that you create or draw will automatically be added to the stack as the last child. As you add more child elements, note that the stack panel will clip (or hide) those elements that do not fit. To edit clipped child elements, select them by clicking on them under Objects and Timeline in the Interaction panel. You can then edit the bounding box for the elements, and so on.
  • Popup, Viewbox, ScrollViewer, Border   Popup, Viewbox, ScrollViewer, and Border take only a single child element. Be aware that when you add child elements to these layout containers, each child element that you add will simply replace the previous child element. In general, place a grid or canvas panel into these layout containers so that they can hold multiple child elements.