Posts Tagged ‘wpf’

Moving WPF control to class library

Wednesday, April 15th, 2009

I recently made my first WPF control. It’s just a simple control to show media files. After experimenting with it and seeing all was ok I moved the files to the main project where it would reside in a class library project.

It stopped building with the exception: ‘Library project file cannot specify ApplicationDefinition element’.

To anyone with 15 minutes of WPF experience this does not say a lot. Even after searching the web I couldn’t really understand what was going on but this thread did set me on the right track. You need to set the build action of your WPF control to ‘Page’.

wpfusercontrol