Reputation: 8132
I have an application that is currently based on WinForms and I am in progress of converting it to WPF. I added PresentationFramework
, PresentationCore
and System.Xaml
as references. I now want to add a WPF dialog to this application, but when I right-click File
/ New
and select WPF
it only shows me the UserControl
. What else do I have to add to make the other WPF stuff appear?
Edit: When I start a new WPF application or library, the items ARE there.
Upvotes: 0
Views: 93
Reputation: 1650
The templates Visual Studio suggests for adding new files depend on the project type. This is determined by the "ProjectTypeGuids" setting of your project.
Open your sample WPF .csproj file in a text editor. You will find a line similar to this:
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
You need to add this line to your migration project (or replace the existing one) to convert it to a WPF project.
(Sample config is from VS2015, so you should really double check with actual VS2010 projects)
Upvotes: 1