September 2012
Intermediate to advanced
464 pages
10h 55m
English
Sometimes a simple decoration is required around some element or panel, such as a border. Luckily, the Border element does just that to anything placed inside it.
Make sure Visual Studio is up and running.
We'll create a simple border encompassing some text, to show most of the capabilities of Border:
CH03.BorderDemo.MainWindow.xaml. Replace the existing Grid with a StackPanel, and add a TextBlock inside it, like the following markup shows:<StackPanel Margin="4">
<TextBlock Text="Hello from Center" FontSize="25"
HorizontalAlignment="Center" />
</StackPanel>StackPanel ...