RadTrialFeatureReminder has the same logic for displaying the reminder messages as
the ApplicationReminder but it also adds two additional properties – UsageCount
and FeatureId. Here is an example of how to define and configure the FeatureReminder:
featureReminder = new RadTrialFeatureReminder()
FeatureId = 1,
FreeUsageCount = 1,
OccurrenceUsageCount = 2,
AllowedTrialUsageCount = 7
And here is what we can do when the feature will be executed:
private void FeatureButton_Click(object sender, RoutedEventArgs e)
Please note that if the trial is usage-based, you need to manually increase the UsageCount property
when the feature is used in order to correctly determine when the trial is expired.
In this example, the first time this feature is used no notification will be displayed (because there the FreeUsagesCount is 1).
During the next application usages there will be reminders but not everytime (since the OccurenceUsageCount is 2) that this is a trial and it is about to expire.
After the feature has been used a total of 7 times (including the free usage and the usages with or without reminders).
And after that, there will be a different reminder that will notify that the feature has already expired.
When the trial is for period, the FirstUsageDate property can be set when the feature is used for the
first time, if it is not set, the application installation date will be used.
For the Usage trial, on the other hand, the UsageCount property should be incremented each time the
specific feature is used.