Integrating view parts

I have copied the sample code for "Integrating view parts inside an existing SDL Trados Studio view" into an empty project and I am getting an error. In the last line of code, the Lazy<T> initialisation, I have a red wiggly line under all three instances of "MyProjectViewPartControl"

I have all the references required by the sample code but are there any others needed?

Ben