Border.Child Property
[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
Gets or sets the child element to draw the border around.
Assembly: System.Windows (in System.Windows.dll)
XMLNS for XAML: Not mapped to an xmlns.
Border can have only one child object. To apply a border around multiple objects, wrap the elements in a container (StackPanel, Grid, or Canvas, for example) and put the border around the container.
Child is the XAML content property for Border. A content item for a Border sets the Child property; a Border.Child property element is not required to enclose the content.
The following example shows how to wrap a border around multiple objects using a StackPanel as the container.
<Border BorderThickness="5" BorderBrush="Blue" > <StackPanel Grid.Column="0" Grid.Row="0"> <TextBlock Text="One"/> <TextBlock Text="Two"/> <TextBlock Text="Three"/> </StackPanel> </Border>