Edw*_*uay 13 c# wpf xaml itemscontrol
在我的演示者中,我有这个属性:
public List<string> PropertyNames { get; set; }
Run Code Online (Sandbox Code Playgroud)
我想用ItemsControl/DataTemplate列出名称,如下所示:
<ItemsControl ItemsSource="{Binding PropertyNames}">
<ItemsControl.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Value}"/>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
Run Code Online (Sandbox Code Playgroud)
由于通用列表没有命名属性,如何在Binding语句中引用该值?
Edw*_*uay 36
让我回答一下,这只是{Binding}.