Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How Does 3rd Party Component Licensing work in WPF? [closed]

In WinForms whole licensing schema in .NET is revolved around LicenseManager and LicenseProvider as mentioned quite nicely in this article.

I have simple test form in WinForm (dropped licensed DevExpress's ButtonEdit in there) using below code I can see that it is getting license info fine:

var license = LicenseManager.Validate(typeof(ButtonEdit), this);

I can also see that it has auto generated licenses.licx file and added to my project.

So, I have tried to the same by dropping DevExpress/Telerik WPF controls into my sample WPF Window and I can see that licenses.licx file is NOT auto generated.

So If I try to run the same line in the WPF, license is returning null. That means that it is not using whole LicenseManager architecture in WPF.

What is it using then to check license for 3rd party component?

Looks like someone reported a bug in VS 2010 in regards to this, but I am using VS2010.

like image 448
Bek Raupov Avatar asked May 17 '12 09:05

Bek Raupov


1 Answers

WPF also uses the same mechanism. You simply need to apply the LicenseProvider attribute to your class.

The licx file may not be generated in your project due to some other reason.

like image 191
logicnp Avatar answered Oct 15 '22 19:10

logicnp