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

CommandManager CanExecute

1 Answer 85 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Sebastiano
Top achievements
Rank 1
Sebastiano asked on 07 Feb 2012, 12:29 AM
Hi,
I've been using the command manager based on the posted examples, but have been running into a problem lately. Sometimes the can execute property is not refreshing correctly. It refreshes on some situations, but sometimes it needs to be forced (by switching tabs for example). Is there a way to force by code a refresh so the can execute updates acordingly?

Many thanks!
Sebastiano Sessa

1 Answer, 1 is accepted

Sort by
0
Hristo
Telerik team
answered on 07 Feb 2012, 02:13 PM
Hello Sebastiano,

To force invalidate on RoutedCommands you can call CommandManager InvalidateRequerySuggested() static method. Keep in mind that this can have negative impact on the performance of your application if a lot of routed commands are used.
My recommendation is to check why commands are not invalidating correctly and if you think that they should invalidate then post here the scenario which is not working as expected.

Greetings,
Hristo
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
General Discussions
Asked by
Sebastiano
Top achievements
Rank 1
Answers by
Hristo
Telerik team
Share this question
or