Some of the issues with switching between XML and generated code in the same movie are,
1. The code gen doesn't work like that. The generated code needs to have/know all the types and instances while generation. Essentially it needs to say "this string variable in this TextWidget is binded to this string variable in SPInventoryVM(for example)". And it needs to say this like "_textWidget.Text = _dataSource.HeroLabelName" for example. So it needs to know the specific type, instance and variable name. If it cannot know it, needs to get it in runtime, and that's reflection, what we're trying to avoid. So it goes from most parent to bottom, not individually separate.
2. The generated code needs to have direct references to the instances it is creating. Since it needs to add children, set it's ids, set it's visual properties like Size, Sprite etc. So it needs to say, "Ah, I'll be adding a TextWidget FooBar and it's size is this, it'll have this as a Brush and it'll have this amount of Children etc." Changing that into a different widget with an overriding xml and adding new children or changing it's type, will break other references to FooBar and it's children. In the generated code FooBar might have 3 children and a widget higher up might be referencing it's second child like
FooBar.AddChild(WantedChildWidget);
HigherUpWidget.WantedChildWidget = WantedChildWidget as ListPanel;
So even though the FooBar and WantedChildWidget is overriden from the xml, they're referenced in the code. This will result in an error.
There are more issues like these but I don't want to make this post too long.