I have this data structure:
Post {
attachments { },
postText
}
To display this, i am using ListView
<ListView ItemsSource="{Binding Posts}"
ItemTemplate="{StaticResource PostTemplate}"
Width="Auto"
Height="Auto" />
The problem is, when i am trying to display a list of attachments inside each post. Every attachment is simply typed link for some typed content (video/audio/image)
Attachment {
type: video,
url: urlToVideo
}
How can i display context-based template for rendering all kind of this content in attachment?