更新时间:2022-06-03 03:20:33
您不必指定模板,你可以使用的DisplayMemberPath属性,就像这样:
you don't need to specify a template, you can just use the DisplayMemberPath property, like so:
<ListBox ItemsSource="{Binding SomeCollection}" DisplayMemberPath="ThePropertyOnElm" />
希望这有助于!
hope this helps!