"Pro WPF with VB 2008: Windows Presentation Foundation with .NET 3.5"
There are also two more general decorators that are useful when composing user interfaces: the Border and the Viewbox. The Border The Border class is pure simplicity. It takes a single piece of nested content (which is often a layout panel) and adds a background or border around it. To master the Border, you need nothing more than the properties listed in Table 5-1. Table 5-1. Properties of the Border Class Name Description Background Sets a background that appears behind all the content in the border using a Brush object. You can use a solid color or something more exotic. BorderBrush and BorderThickness Set the color of the border that appears at the edge of the Border object, using a Brush object, and set the width of the border, respectively. To show a border, you must set both properties. CornerRadius Allows you to gracefully round the corners of your border. The greater the CornerRadius, the more dramatic the rounding effect is. Padding Adds spacing between the border and the content inside. (By contrast, margin adds spacing outside the border.) Here??™s a straightforward, slightly rounded border around a group of buttons in a StackPanel: BorderBrush="SteelBlue" BorderThickness="3,5,3,5" CornerRadius="3" VerticalAlignment="Top">