I have a hierarchy of data that looks like this:
- Policy
- Check
- Action
- Action
- Action
- Check
- Action
- Check
- Check
For each Policy/Check/Action, I have a custom control built in WPF. I have been programmaticly adding new instances of my controls to containers in the parent control. (IE. When a user clicks the "Add Check" in the Policy control, I will do a MyPolicy.StackPanelChecks.Children += new CheckControl()
). I am converting to an MVVM model and am trying to use data binding to populate this StackPanel (and don't want to embed DataTemplates into my code, especially with a hierarchy of data model objects).
What is the best known way to do this?