Border


BorderHierarchy: UIElement FrameworkElement Decorator

     <Border         Height="25"         Background="White"         BorderBrush="Black"         BorderThickness="1"         CornerRadius="20"         Padding="2 2 2 2">     </Border> 

<Border .../> draws a border, background, or both around an element (Figure 10-1). Only elements contained within a parent Border element can display a border.

Border can have only one child. To display multiple children, an additional Panel element needs to be placed within the parent Border. Child elements can then be placed within that Panel element.

Attributes


Background (optional)

Describes the Brush used to fill the interior of the element.


BorderBrush (optional)

Describes the Brush used to paint the border.

Figure 10-1. Border


BorderThickness (optional)

Describes the thickness of the line used to draw the border. It is described in terms of Left, Top, Right, and Bottom, all of which are Double values representing a pixel value. It is most often described as a single value.


CornerRadius (optional)

Describes the degree to which the corners of the Border are rounded. Though the name of the attribute implies a single value, non-uniform radii may be used.


Padding (optional)

Describes how much the child element size is increased. It is described in terms of Left, Top, Right, and Bottom, all of which are Double values representing a pixel value.




XAML in a Nutshell
XAML in a Nutshell (In a Nutshell (OReilly))
ISBN: 0596526733
EAN: 2147483647
Year: 2007
Pages: 217

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net