在我的演示者中,我有这个属性:
public List<string> PropertyNames { get; set; }
我想用 ItemsControl/DataTemplate 列出名称,如下所示:
<ItemsControl ItemsSource="{Binding PropertyNames}">
<ItemsControl.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Value}"/>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
由于通用列表没有命名属性,我如何引用value在我的绑定声明中?
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)