This isn’t the exact solution you’re looking for, but I beleive Layouts is the exact feature trying to address this issue. I just begun using it in some of my new projects and it has greatly reduced the repetitive UI build. I analogize them to a parent class from which my children inherit from.
Still not a pure code solution, but a step closer! I found positioning to be the biggest headache when going the full code route.