When working with WPF projects in Visual Studio, you can add WPF Windows, Pages, User Controls and Resource Dictionaries to a project by right clicking on the project and selecting Add > Window…, Add > Page…, Add > User Control… or Add > Resource Dictionary… menu options.
The problem I run into is that these menu options are only available if you selected one of the WPF project templates when adding the project to your solution. How can we add WPF items to existing projects in our solutions? The solution is similar to my previous post that describes adding workflows to existing projects.
Add references to PresentationCore, PresentationFramework, System.Core, System.Data, System.XML, System.Xml.Linq, and WindowsBase to your project. Close Visual Studio and open the csproj file in a text editor. Add the following project type Guids to the PropertyGroup element:
Re-open your solution in Visual Studio. The WPF menu options should now be available for your project.