Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to build library with WPF forms

Is it possible to build a Class Library dll which also includes WPF forms? When I try to build one I get following errors:

Error 1 Library project file cannot specify ApplicationDefinition element.
Error 2 The project file contains a property value that is not valid.

If I set my project as Windows Application it compiles & runs tho. Is there a way to get arround this? I'm using VS2010 & C# .NET 4.0 if that might be of any interest to you guys.

Thanks

like image 575
Jens Avatar asked Dec 14 '10 07:12

Jens


People also ask

Is WPF still relevant 2022?

“WPF would be dead in 2022 because Microsoft doesn't need to be promoting non-mobile and non-cloud technology. But WPF might be alive in that sense if it's the best solution for fulfilling specific customer needs today. Therefore, having a hefty desktop application needs to run on Windows 7 PCs with IE 8.

Is WPF relevant in 2021?

It was in 2006 that Windows Presentation Foundation (WPF) was released with . NET framework 3.0. Over the years it got improved and it is still now in the market in 2021.

Is WPF still in demand?

WPF is still one of the most used app frameworks in use on Windows (right behind WinForms).


1 Answers

Choose WPF Custom Control Library or WPF User Control Library when creating/adding new project to your solution.

like image 184
decyclone Avatar answered Sep 20 '22 18:09

decyclone