Как говорит Майк, посмотрите на код, созданный как часть нового приложения DataBound.
Кроме того, вместо отображения данных в сетке, вероятно, лучше отображать данные вертикально в столбце:
<Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
<StackPanel>
<TextBlock Text="Name" Style="{StaticResource PhoneTextLargeStyle}" />
<TextBlock Text="{}Binding Name}" Margin="20,0,0,0" />
<TextBlock Text="ID" Style="{StaticResource PhoneTextLargeStyle}" />
<TextBlock Text="{Binding ID}" Margin="20,0,0,0" />
<TextBlock Text="City" Style="{StaticResource PhoneTextLargeStyle}" />
<TextBlock Text="{Binding City}" Margin="20,0,0,0" />
<TextBlock Text="Category" Style="{StaticResource PhoneTextLargeStyle}" />
<TextBlock Text="{Binding Category}" Margin="20,0,0,0" />
<TextBlock Text="Others" Style="{StaticResource PhoneTextLargeStyle}" />
<TextBlock Text="{Binding Others}" Margin="20,0,0,0" TextWrapping="Wrap" />
</StackPanel>
</Grid>
И как быстрый способ увидеть, как это может выглядеть при заполнении:
public partial class MainPage : PhoneApplicationPage
{
public MainPage()
{
InitializeComponent();
Loaded += MainPage_Loaded;
}
void MainPage_Loaded(object sender, RoutedEventArgs e)
{
// This would really be the data returned from the web service
var sampleData = new WsData
{
Name = "Girilas & Gandhi Nagar",
ID = "842",
City = "Bangalore",
Category = "Shopping Mall",
Others = "AC Types: central\n AC, Split AC Windows\nACWhirlpool:\nMicrowave Oven ..."
};
this.DataContext = sampleData;
}
}
public class WsData
{
public string Name { get; set; }
public string ID { get; set; }
public string City { get; set; }
public string Category { get; set; }
public string Others { get; set; }
}