Page MainPage presents the following XAML (the cut is not important for reasons of space):
Code:
<Phone: PhoneApplicationPage
x: Class = "ThinkMore.DataBoundTrial.MainPage"
xmlns = "http://schemas.microsoft.com/winfx/2006/xaml/presentation"
<! - Omitted the import namespace ->
<! - And reporting the parameters of the page ->
>
<Grid X:Name="LayoutRoot" Background="Transparent">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</ Grid.RowDefinitions>
<! - TitlePanel contains the name of the application to page title ->
<StackPanel X:Name="TitlePanel" Grid.Row="0" Margin="12,17,0,28">
<TextBlock X:Name="ApplicationTitle" Text="DEVELOP GROUP" Style="{StaticResource PhoneTextNormalStyle}" />
<TextBlock X:Name="PageTitle" Text="Company" Style="{StaticResource PhoneTextTitle1Style}" />
</ StackPanel>
<! - ContentPanel contains ListBox and ListBox ItemTemplate. Place additional content here ->
<Grid X:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
<ListBox X:Name="MainListBox" Margin="0,0,-12,0" ItemSource="{Binding Items}" SelectionChanged="MainListBox_SelectionChanged">
<ListBox.ItemTemplate>
<DataTemplate>
<StackPanel Margin="0,0,0,17" width="432">
<TextBlock Text="{Binding LineOne}" TextWrapping="Wrap" Style="{StaticResource PhoneTextExtraLarge}" />
<TextBlock Text="{Binding LineTwo}" TextWrapping="Wrap" Margin="12,-6,12,0" Style="{StaticResource PhoneTextSubtleStyle}" />
</ StackPanel>
</ DataTemplate>
</ ListBox.ItemTemplate>
</ ListBox>
</ Grid>
</ Grid>
</ Phone: PhoneApplicationPage>
After the class definition of the main page and its XML namespace, the code offers a grid to separate the application title page and the content of the page. The first row of the Grid in fact contains two TextBlock with the license application and the title page itself, which we have suitably modified to adhere to the example we will do.
Bookmarks