Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / Silverlight > General Discussions > CommandManager CanExecute

Not answered CommandManager CanExecute

Feed from this thread
  • Sebastiano avatar

    Posted on Feb 6, 2012 (permalink)

    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

    Reply

  • Hristo Hristo admin's avatar

    Posted on Feb 7, 2012 (permalink)

    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 >>

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / Silverlight > General Discussions > CommandManager CanExecute