Click here to Skip to main content
15,881,803 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Am working on a WPF application project, so my query is am not able to add a WPF window as a new item because am not seeing any options.

What I have tried:

I tried re-installing the .Net desktop development framework but still, the result was the same.
Posted
Updated 15-Nov-22 18:06pm

Did you right-click your WPF project in Solution Explorer and click Add -> Window?
 
Share this answer
 
Comments
Santosh Goudappanavar 16-Nov-22 0:25am    
@Dave Exactly when I tried doing so, am not seeing any templates by name WPF
Dave Kreskowiak 16-Nov-22 7:37am    
That's because your project is not a WPF app project. I don't know what type of project you created, but I would suggest you start over and recreate your project using the WPF desktop app project template.
On your Menu bar go: Project > Add Window (WPF) or as Dave described above.
 
Share this answer
 
Comments
Santosh Goudappanavar 16-Nov-22 0:27am    
@Graeme_Grant I tried doing so but I couldn't see any options of WPF when I Right clicked on project>Add item>New item
Graeme_Grant 16-Nov-22 0:56am    
Then the project is not a WPF project. Check the Project type. The .csproj file should have
<UseWPF>true</UseWPF>
Santosh Goudappanavar 16-Nov-22 1:22am    
@Graeme_Grant The project is a toolkit that was developed on the WPF platform (Xbim Xplorer toolkit).
I tried opening its .csproj but it doesn't have <usewpf>true
Graeme_Grant 16-Nov-22 1:38am    
A quick look tells me that the "Xbim Xplorer toolkit" is a third-party library that could be used in your WPF application. It could also be used in a web application. So the Toolkit is not specifically WPF. Your application "can be" a WPF application - that is your choice.
Santosh Goudappanavar 16-Nov-22 1:52am    
Ohh is it!! thankyou mate for the quick look. In fact, I am being new to this coding and stuff so apologize for the inappropriate questions. So now can I use it in the WPF template or project to further develop the functionalities?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900