开发者

add button in each row I create in WPF listview

how can I create button in each row I add in listview in c# WPF Like what when you conn开发者_高级运维ect to wireless network in windows 7 ?


You need to assign the ListView a DataTemplate for it's items. Try this:

<ListView ItemsSource="{Binding Path=MyCollection}">
    <ListView.ItemTemplate>
        <DataTemplate >
            <Button>Go</Button>
        </DataTemplate>
    </ListView.ItemTemplate>
</ListView>
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜