I'm not entirely sure I understand everything you're trying to do, but I have a good idea. You've implemented IRootDesigner, which is good. Does this work? You are able to open the designer in Visual Studio?
I don't know how to add custom templates to the new files dialog in Visual Studio, and I would guess that to completely override the way it generates code, you would have to get some kind of extensibility SDK.
You need to go completely above the whole CodeDom serializer thing, since CodeDom can't represent XML.