开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜