3

This is hard to explain, and I am still pretty novice so I am apologies in advance.

Is there a way to take a WPF XAML document and display a list of them in a listBox?

Like if I wanted to make a contact list. I could create a .xaml file with the stuff I want (Icon, String to hold name, icon to show cell/home/pager) then call in to a list as if it were a class that I am making an instance off to fill the list.

Any help, even just a name, pattern or keyword to lookup, would be extremely helpful.

Thanks, Dane

0

1 Answer 1

11

What you are looking for is called an ItemTemplate. It's a description of what each item in your collection should look like in your view.

A nice tutorial can be found here.

Sign up to request clarification or add additional context in comments.

1 Comment

Thank you very very much. I have been googling around for "List objects" "List WPF files" "WPF Contact List" for hours. This is exactly what I was looking for.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.