Our application uses a CollectionView with a Grid Layout.
The component contains 2 types of objects, which load a different template depending on the type.
This works well, but now we want to configure it a bit differently so that an object can take 2 columns if needed the (object contains a property with the column information)
<CollectionView
x:Name="CollectionView"
HorizontalScrollBarVisibility="Always"
IsVisible="{Binding ShowAttachments}"
ItemsSource="{Binding Attachments}">
<CollectionView.ItemsLayout>
<GridItemsLayout Orientation="Vertical" Span="{Binding GirdColumns}" />
</CollectionView.ItemsLayout>
<CollectionView.ItemTemplate>
... templates ...
</CollectionView.ItemTemplate>
1