Xceed Toolkit for Maui v2.0 Documentation
Licensing
Welcome to Xceed Toolkit for Maui v2.0 > Getting Started > Licensing

In order to use the controls provided by Xceed Toolkit for Maui in your application, the LicenseKey property of the Licenser class must be set using a valid license key before any other method is called. If you use an invalid or expired license key, fail to license the control altogether, or license it in the wrong place in your code, an exception will be thrown at runtime (see License Exception section below for more information on this subject).

A valid license key can either be a registered license key, which is provided to you when you purchase the product(s) from Xceed, or a non-expired trial license key, if you are simply evaluating the component.

 

Setting the LicenseKey Property

It is recommended that you set the LicenseKey property in the main entry point of the application. For example, C# users can set the LicenseKey property in the static main function, while VB.NET users can set the LicenseKey property in the main form's constructor or in the "Sub Main" procedure.

Note that the key begins with "TKM" for Toolkit for Maui.

static void Main( string[] args )
{
  Xceed.Toolkit.Maui.NET.Licenser.LicenseKey = "TKMXX-XXXXX-XXXXX-XXXX";
  Console.WriteLine( "Hello World!" );
}
Public Shared Sub Main(ByVal args As String())
  Xceed.Toolkit.Maui.NET.Licenser.LicenseKey = "TKMXX-XXXXX-XXXXX-XXXX"
  Console.WriteLine("Hello World!")
End Sub

License Exception

If an invalid or expired license key is used, or if the LicenseKey property is omitted or set in the wrong place, an exception will be thrown at runtime. However, depending on the Visual Studio exception, debugging settings and the browser in which the application is run, it may be displayed in different ways.

If something goes wrong, the first thing to verify is whether the LicenseKey property has been set to a valid license key.

See Also