I know you can't have code in template parts, but it would be nice to create the form layout and the data source.
Of course we could do this in the InfoPath Design Mode, and then import the finished template parts into Visual Studio, but it would be nice to do everything in the same development environment, and also we would like to put them under source control. We are using Team Foundation Server which integrates nicely with Visual Studio.
Microsoft have provided the option to create a template part in Visual Studio 2008, but it seems that it leads to a dead end.