© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•3y ago•
6 replies
olleeee

✅ WPF, how do i fill listboxes with values

Hi im trying to fill my list with objects and then only display the name what should i do?
 public void FillLists(Wizard wizard)
 {

     lstGryffindor.ItemsSource = hogwarts.Griffendor.Members;
     lstHufflepuff.ItemsSource = hogwarts.Hufflepuff.Members;
     lstRavenclaw.ItemsSource = hogwarts.Ravenclaw.Members;
     lstSlytherin.ItemsSource = hogwarts.Slytherin.Members;

 }
 public void FillLists(Wizard wizard)
 {

     lstGryffindor.ItemsSource = hogwarts.Griffendor.Members;
     lstHufflepuff.ItemsSource = hogwarts.Hufflepuff.Members;
     lstRavenclaw.ItemsSource = hogwarts.Ravenclaw.Members;
     lstSlytherin.ItemsSource = hogwarts.Slytherin.Members;

 }
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

[WPF] Svg changing fill during runtime.
C#CC# / help
15mo ago
✅ How do I run async methods? WPF
C#CC# / help
9mo ago
❔ How do I implement tabbed interface in WPF?
C#CC# / help
4y ago
How can I use wpf with c++?
C#CC# / help
2y ago