I have custom FrameworkElement (displays 3D model, and allows to control camera), and i need to display multiple items of this type simultaneously (they should be overlapping). Items are stored in list. For now, i can achieve that by simply placing few ContentControls in Grid, and using my FrameworkElements as Content. And it works well. But, any attempt to achieve that result for custom ammount of elements fails. I've tried to use ItemsControl, but it just doesn't work. Is there any convenient way to display multiple items from source list, placing them in single position?
Update
Canvas and ItemsControl are simply not working for me. Even if i simply move single element there. That means,
<ContentControl Content="{Binding DrawableElements[0]}"></ContentControl>
works well, but
<ItemsControl>
<ContentControl Content="{Binding DrawableElements[0]}"></ContentControl>
</ItemsControl>
doesn't work at all, although, it's pretty basic approach. Same goes to Canvas. I don't know, if i'm using it right, but i just can't understand, why simple ItemsControl with single element doesn't want to be displayed.
Update #2
If i have class, which has certain properties, with FrameworkElement among them, my ItemsControl, which uses list of this class instances, will work just fine with any properties EXCEPT FrameworkElement. Now i really can't understand what happening.
Note: I'm trying to follow MVVM pattern, so there should be no direct impact on UI from code. That's why I've chosen ContentControl in first place. Otherwise i might simply add new FrameworkElements as children to simple Grid.
The problem was, thas ContentControl inside ItemsControl was setting its size params to 0 by default, so, basically, my FrameworkElements were just zero sized. I had to specify Widht and Height manually to make it visible.