在我的Presenter中,我有这个属性:
public List<string> PropertyNames { get; set; }
我想使用ItemsControl/DataTemplate列出名称,如下所示:
<ItemsControl ItemsSource="{Binding PropertyNames}">
<ItemsControl.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Value}"/>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
由于通用列表没有命名属性,我该如何在绑定语句中引用值?