你好,
如果你想ListBoxItem中显示集合,你应该设置ListBoxItem的数据模板。
参考如下代码:
<ListBox x:Name="lbInMappingList" Grid.Row="1" ItemsSource="{Binding FileMap}" >
<ListBox.ItemTemplate>
<DataTemplate>
<StackPanel>
<TextBlock Text="{Binding Key}"/>
<ItemsControl ItemsSource="{Binding Value}"></ItemsControl>
</StackPanel>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
显示value集合的元素你可以选择任何集合控件,例如listbox, combobox等等。
Best Regards,
Bob
MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to
MSDN Support, feel free to contact MSDNFSF@microsoft.com.