This is a migrated thread and some comments may be shown as answers.

Reminder and Commands

1 Answer 61 Views
TrialFeatureReminder
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Eric Schoenholzer
Top achievements
Rank 2
Eric Schoenholzer asked on 17 Feb 2012, 03:31 PM
Hello,

Is it possible (or good idea) to use the Reminder in a ICommand CanExecute method, specially Notify()?

I'm using a RadContextMenu and the command are dependent of Trial or not Trial.

Or how you would use the reminder in a such scenario?
(I'm not using MVVM, so calling Notify would be ok for me)

Thanks
Eric

1 Answer, 1 is accepted

Sort by
0
Todor
Telerik team
answered on 21 Feb 2012, 04:49 PM
Hi Eric,

Thank you for your question.

The CanExecute method is used to determine whether a command can be executed, and it shouldn't have any side effects like displaying a trial reminder notification, which is what reminder's Notify method does. This is why the Notify method should be in the Execute method when used with commands. In CanExecute you can use the IsTrialExpired property to correctly determine whether the command should be executable or not. I have attached a sample project with an example. Please note, that we have just made some changes in the ContextMenu logic, so in order to make the sample project run correctly, you will have to download our latest internal build from the Downloads section of you account.

All the best,
Todor
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Tags
TrialFeatureReminder
Asked by
Eric Schoenholzer
Top achievements
Rank 2
Answers by
Todor
Telerik team
Share this question
or