Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
160
enable/disable a context menu based on a WCF call
posted

Hi,

I am in the process of converting a WinForms app to Silverlight.

We have a context menu currently on our grids, in the opening event I'd like to do a WCF call and enable/disable menu items based on what is returned.

Given the async nature of WCF calls, how do I prevent the menu displaying until this has been done?

Thanks,

Dan

Parents
  • 21382
    Verified Answer
    posted

    You could cancel the opening event, which would prevent the menu from opening and then in your callback call for the menu to show then.   

     

     

    But you might also want to consider allowing the menu to open on the Opening but have all the questionable options in the menu already disabled and enable them on your call back.  Even if they are all initially disabled, the end use would see that the menu is popped up on their action.

Reply Children
No Data