Using Fill Layout

Fill layout uses the entire size of the parent, and sizes all of its children to the same size as well. If a child has a maximum size that is smaller than the size forced by the parent, this child is not displayed.

The example below shows how fill layout can be used and how it compares to another layout, such as center layout.

An example of Fill layout.

<!-- This colorfill uses Fill layout. The child fills the parent area. -->
<ColorFill Layout="Fill" Content="Green" MaximumSize="200,200" >
    <Children>
        <Text Content="Fill layout" BackColor="Firebrick" />
    </Children>
</ColorFill>

Sample Explorer

  • Layout > Fill

See Also