Jul 22, 2010 at 6:14 PM
Edited Jul 22, 2010 at 6:16 PM
Perhaps it could just be a simple way to add a list of types that should be processed recursively and a naming convention. Then it is a simple change to the ModelBinder to add a recursive loop rather than call some external method that ends up replicating
the same exact logic.
Then it would take any property derived from the CSLA base class and scan it for public properties binding them to controls name as TypeName + '_' + TypeName.PublicProperty to TypeName.PublicProperty.
So it would pickup ViewModel.childModel.SomeProperty and bind as childModel_someProperty when the visual element was named ChildModel_SomeProperty
instead of adding a type and maintaining a list of types (more app generic) you could add a [RecursiveBindingProperty] attribute on the property to be processed recurively.
The reverse, [SkipRecursiveBinding], could be used in conjuction with the first option to optimize what not to scan for extra bindable properties.