wpf - how to add DragDockPanel Dynamically, using ItemsControl? -
<grid> <blacklight_controls:dragdockpanelhost > <itemscontrol itemssource="{binding path=dashboarditemlist}"> <itemscontrol.itemtemplate> <datatemplate> <blacklight_controls:dragdockpanel header="titel"/> </datatemplate> </itemscontrol.itemtemplate> </itemscontrol> </blacklight_controls:dragdockpanelhost> </grid>
this appear this..
the newly generated dragdockpanels itemscontrol, added inside dragdockpanel. not dragdockpanelhost. because dragdockpanels cannot move. need , generated dragdockpanes must directly add dragdockpanelhost, no inside dragdockpanel.
i had same problem. removing itemtemplate produced effect wanted.
<blacklight:dragdockpanelhost x:name="fields" > <itemscontrol> <blacklight:dragdockpanel style="{staticresource dragdockpanelstyle}"> <contentcontrol cal:view.model="{binding}" /> </blacklight:dragdockpanel> </itemscontrol> </blacklight:dragdockpanelhost>
Comments
Post a Comment