How to use the DisplayMemberPath in a ListView with an ItemContainerStyle?
问题 Within a ListView control, how to use the DisplayMemberPath property when I want to change the ItemContainerStyle ? I used a ListView control in the ControlTemplate of my control and the DisplayMemberPath property is set via Binding from outside of control. <ListView ItemsSource="{TemplateBinding ItemsSource}" DisplayMemberPath="{TemplateBinding DisplayMemberPath}"> <ListView.ItemsPanel> <ItemsPanelTemplate> <StackPanel Orientation="Horizontal" /> </ItemsPanelTemplate> </ListView.ItemsPanel>