<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 like this..
The newly generated DragD开发者_Go百科ockPanels by ItemsControl, added inside another DragDockPanel. Not the DragDockPanelHost. Because DragDockPanels cannot be move. What I need is , generated DragDockPanes must be directly add to the DragDockPanelHost, no inside a another DragDockPanel.
I had the same problem. Removing the ItemTemplate produced the effect I wanted.
<blacklight:DragDockPanelHost x:Name="Fields" >
<ItemsControl>
<blacklight:DragDockPanel Style="{StaticResource DragDockPanelStyle}">
<ContentControl cal:View.Model="{Binding}" />
</blacklight:DragDockPanel>
</ItemsControl>
</blacklight:DragDockPanelHost>
精彩评论