开发者

How to write ListViewItem that contain image , text and button?

开发者 https://www.devze.com 2023-01-19 18:16 出处:网络
I need to write some listViewItem( using WPF ) - that contain image, text and button. I want to inherit from the simple listViewItem class and add to the开发者_JS百科 listview item that contain the

I need to write some listViewItem ( using WPF ) - that contain image, text and button.

I want to inherit from the simple listViewItem class and add to the开发者_JS百科 listview item that contain the three items ( image, text, button ).

I don't understand how the listView control will arrange the 3 items ( image , text, button ) in the right order in the control - how to tell the listview control that the image is first, text is second and the button is the third ?


First read more about Layout controls. like StackPanel and Grid - so you can understans how to arrange items.Then read about templates. Solution for a task which is very similar to yours is given here: http://www.codewrecks.com/blog/index.php/2008/03/26/first-steps-on-wpf-listview-with-template-based-on-data/

0

精彩评论

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

关注公众号