#1,044 – Placing More than One Element in a Grid Cell

There is nothing to prevent you from placing more than one element within a given cell in a Grid.  In the example below, the Button and the Label share the same cell.

            <ColumnDefinition Width="Auto"/>

        <Button Content="Push Me" Width="100" />
        <Label Content="Oops I'm in the same cell with a button !" />


By default, controls that share the same Grid cell are layered in the order in which they are added to the Grid.  Elements added earlier appear below elements added later.

If we reverse the order of the Button and Label elements in XAML, listing the Label first, it will appear under the Button.