My mainwindow ViewModel has an ObservableCollection of ViewModels, called ViewModels.
The Mainwindow XAML has an ItemsControl with ItemsSource bound to ViewModels.
When I have
<ItemsControl ItemsSource="{Binding ViewModels}" />
The Views associated with each ViewModel in the collection are rendered one below the other. The Views are UserControls, displaying dataGrids.
How can I position them in a customizable way, for example such that VM1 is on the left, and VM2 and VM3 are stacked one on top of the other to the right of VM1.
Each VieModel has PosX, PosY, Width and Height properties, and I've been trying various templating methods but no success so far.
I have found examples of how to this with Observable collections of images, but one thing I'm struggling is that my collection is of ViewModels.