Avalonia UI components for license-management.com end-user SDK. Provides ready-to-use Window and UserControl components, view models, and converters for license registration and management workflows.
Important
Account Required: This library requires a publisher account at license-management.com.
Free with Dev Subscription: A developer subscription is available at no cost, which provides full access to all features for development and testing purposes.
- Windows desktop: Built on Avalonia 11 and the
LicenseManagement.EndUserSDK, which depends on WMI and the Windows Registry. macOS / Linux is not currently supported. - Modern UI: Clean, modern design with Fluent theme and vector iconography
- Embeddable: Use
LicenseControlUserControl in your existing app - Standalone: Use
LicenseWindowfor a complete license management window - Async by default: Non-blocking calls keep the UI responsive even on slow networks
- Differentiated error handling: Maps SDK exceptions (
ComputerOfflineException,LicenseExpiredException,ReceiptExpiredException,ApiException, …) into user-friendly messages with a correlation id for support - Full functionality: Register, unregister, and renew licenses
dotnet add package LicenseManagement.EndUser.AvaloniaWarning
Do not hardcode API keys in source. Load them from configuration files, environment variables, or platform-secure storage (Windows Credential Manager / DPAPI). The samples below use placeholders only.
Show a license management window from anywhere in your app:
using LicenseManagement.EndUser.Avalonia.Services;
using LicenseManagement.EndUser.Avalonia.Views;
var credentials = new LicenseCredentials(
vendorId: "VND_01ABCDEF...",
productId: "PRD_01ABCDEF...",
apiKey: configuration["License:ApiKey"]!,
publicKey: "<RSAKeyValue>...</RSAKeyValue>",
validDays: 30);
var (licenseWindow, initialization) = LicenseWindow.Create(credentials);
await licenseWindow.ShowDialog(parentWindow);
await initialization; // optional: await the first validationAdd the license control directly to your AXAML:
<Window xmlns="https://github.com/avaloniaui"
xmlns:license="clr-namespace:LicenseManagement.EndUser.Avalonia.Views;assembly=LicenseManagement.EndUser.Avalonia">
<license:LicenseControl x:Name="LicenseControl" />
</Window>Initialize asynchronously in code-behind:
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
_ = InitializeLicenseAsync();
}
private async Task InitializeLicenseAsync()
{
var credentials = new LicenseCredentials(
vendorId: "VND_01ABCDEF...",
productId: "PRD_01ABCDEF...",
apiKey: configuration["License:ApiKey"]!,
publicKey: "<RSAKeyValue>...</RSAKeyValue>",
validDays: 30);
await LicenseControl.InitializeAsync(credentials);
}
}Check the license status to enable/disable features:
using LicenseManagement.EndUser.License;
var license = LicenseControl.License;
switch (license?.Status)
{
case LicenseStatusTitles.Valid:
// Full access - license is valid and paid
EnableAllFeatures();
break;
case LicenseStatusTitles.ValidTrial:
// Trial mode - show limited features or trial banner
EnableTrialFeatures();
ShowTrialBanner(license.TrialExpires);
break;
case LicenseStatusTitles.InvalidTrial:
case LicenseStatusTitles.Expired:
case LicenseStatusTitles.ReceiptExpired:
case LicenseStatusTitles.ReceiptUnregistered:
// No valid license - prompt user to register
DisableFeatures();
ShowRegistrationPrompt();
break;
}Trial period length is controlled by the server and embedded in the license file as
TrialEndDate. If a trial is extended in the dashboard, the updatedTrialEndDatewill appear after the client refreshes the license file.
- .NET 8.0 or later
- Avalonia 11.2+
See the samples/AvaloniaSampleApp directory for a complete working example.
- LicenseManagement.Client - Server-side SDK for managing licenses
- LicenseManagement.EndUser.Wpf - WPF version of this package
For complete API documentation, visit license-management.com/docs.
MIT License - see LICENSE file for details.