There are some pictures uploaded by users and others can comment them. It raise a problem that each picture has different number of comments, so I don’t know I need to make how many textblocks display in xaml file. Please help me to solve it.
Thank in advance.
There are some pictures uploaded by users and others can comment them. It raise
Share
Instead of defining your text blocks ahead of time in the XAML, use a container control (such as a
ListView) to databind a display template to anObservableCollectionof comment objects.Take a look at a tutorial like this one to see this kind of databinding in action.