Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Chapter 9. The Intricacies of Layout > Text Concatenation with StackPanel

9.3. Text Concatenation with StackPanel

A StackPanel with a horizontal orientation can concatenate text. This is demonstrated in the TextConcatenation project:

Example 9-4. Silverlight Project: TextConcatenation File: MainPage.xaml (excerpt)

<Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
    <StackPanel Orientation="Horizontal"
                HorizontalAlignment="Center"
                VerticalAlignment="Center"
                Background="{StaticResource PhoneAccentBrush}">
            <TextBlock Text="Two " />
            <TextBlock Text="plus " />
            <TextBlock Text="two " />
            <TextBlock Text="equals " />
            <TextBlock Text="four!" />
    </StackPanel>
</Grid>


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial