What must I do to use a DataTemplate in a WrapPanel or StackPanel?
On a ListBox its so easy but i cant find a way to do it on a Panel…
Edit: What i want is a ListBox that places the items like a WrapPanel.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If I understand you correctly, you can use the ItemsPanel property of your container. I used something similar to make my ItemsControl layout using a horizontal StackPanel:
So, more specifically for your case: