8,735
社区成员
发帖
与我相关
我的任务
分享
<Grid x:Name="LayoutRoot" Background="White" DataContext="{Binding Path=Employees}">
<StackPanel>
<TextBlock Text="{Binding Path=Name, StringFormat=Your Name: \{0\}}" />
<TextBlock><Run Text="Your Age"/><Run Text="{Binding Age}" FontSize="18" /></TextBlock>
<ListBox ItemsSource="{Binding}">
<ListBox.ItemTemplate>
<DataTemplate>
<TextBlock>
<Run Text="{Binding Path=Name}" /><Run Text=" is " /><Run Text="{Binding Age}" /><Run Text=" years old." />
</TextBlock>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</StackPanel>
</Grid>