The problem in your code is that the position of your inner items is on 0, 30*i and that's why the container shape starts from 0,0 (so that it could wrap its inner shapes). If you change this line in your code:
Point(0, 30 * i);
Point(300, 30 * i);
The position of the container shape will be correct.
Also I'd like to point out that when you're using RadDiagramContainerShape with ItemsSource you won't be able to drag an item in or out of the container(that's why in my previous example I used the Items property). If you want to use ItemsSouce you'd better also use business objects for your containers:
MyContainer : NodeViewModelBase, IContainerItem
ColumnMappingDestinationContainerViewModel columnMappingDestinationVM =
var cc2 =
Thickness(5, 5, 5, 5);
"Maps To Columns"
cc2.InnerItems = columnMappingDestinationVM.Items;
cc2.ZIndex = 1;
I've attached an updated version of my previous project so could you please take a look at it and if you have more questions feel free to ask.
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>