Click here to Skip to main content
15,559,275 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
for example in database i have country and city of that country and I want create a expander or anything like expander that can help me for group content that is like expander (hide and show data) that have country name and in expander I want add every city in that country. how to do that?

What I have tried:

Since I don't know how to do it i don't tried anything. I search about it and can't find anything that can help me.
Posted
Updated 25-Oct-22 11:56am
Comments
Gerry Schmitz 25-Oct-22 15:22pm    
User controls (UC): one for each country; and a ListView of cities within an Expander (in the UC). Or you simulate it; loading the ListView when the Expander is "expanded".

1 solution

I think that this is what you are looking for: ListView grouping - The complete WPF tutorial[^]. The tutorial shows you how to use groups with a ListView control and how to make the group expand and collapse.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900