My VM looks something like this:
public class PersonViewModel : ViewModelBase
{
public String Name { get; set; }
public Phone HomePhone { get; set; }
public Phone OfficePhone { get; set; }
public Mailing HomeAddress { get; set; }
}
Of course the view model implements INotifyPropertyChanged and so the property setters in this code snippet are incomplete.
Obvioulsy Phone and Mailing are not simple value types, but rather wrap all the usual properties you'd expect from such a class.
A DataForm, just out of the box will not auto generate fields for those complex types. So I created an EditTemplate and added a DataForm for the complex types and setting the binding accordingly. This raises a couple of issues.
1) As the user tabs from field to field, it seems there is an extra tab required to get into the child DataForm. 2) changing a value in a child form does not trigger the enabling of the Commit button on the outer DataForm.
This leads me to beleive that I'm heading down the wrong path with the DataForm and/or this kind model.
What is the best way to bind a dataform to this kind of "complex" structure?