8,735
社区成员
发帖
与我相关
我的任务
分享
<ListBox ItemsSource="{Binding MyClassDatas}">
<ListBox.ItemTemplate>
<DataTemplate>
<ListBox ItemsSource="{Binding}">
<ListBox.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal">
<TextBlock Text="{Binding myValue1 }" />
<TextBlock Text="{Binding myValue2 }" />
<TextBlock Text="{Binding Time }" />
</StackPanel>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
绑定集合的控件都有ItemsSource和ItemTemplate。
一般是上面这种写法。