c# - Setup code for WPF control created in xaml -
is possible see how control created xaml replicated code behind? reason i'm asking create number of listview
controls based on each item in collection
. hope can setup 1 listview
control in xaml , somehow code need reproduce more listview
objects same settings in code-behind.
alternatively; possible bind collection
object containing items want represented listview
objects control contain listview
controls each item in bound collection? same way listview
can create listviewitem
controls if bind collection listview
control.
cheers
unless have large hierarchy of controls, recommend follows: create list contains lists of data, list<list<data>>
then create itemscontrol
bound list. in itemtemplate
, there listview itemssource
bound datacontext
.
Comments
Post a Comment