简体   繁体   中英

Parent Child Relationship UI

Consider the following Parent/Child relationship. What I would like to know is how I would go about creating a GUI for this with the following requirements:

  1. All Parents or children will contain an image a label and a couple of buttons
  2. Parents will be collapse able
  3. New Parents/Children can be added at any time

I was thinking about using an ItemsControl but am unsure how I would get the nesting to work correctly.

Parent 1  
|-Parent 2  
|-Parent 3  
|--P3 Child 1  
|--P3 Child 2  
|--P3 Child 3  
|---P3 C3 Child 1  
|---P3 C3 Child 2  

A TreeView seems like the most obvious control for this. It allows you to have nested items, and easy parent and child relationships.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM