开发者

Databind value array to list datatemplate

I have a datatemplate for listbox:

<DataTemplate>
    <Rectangle Width="10" Height="{Binding ???}" Fill="Black" HorizontalAlignment="Center"/>
</DataTemplate>

The ItemSource of the开发者_如何学Python list is set to int[] array. What should I specify in Binding ??? to make the binding path take the concrete value?

Thanks.


Have you tried just {Binding}?

This will take the item itself.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜