Recommended

Skip Navigation LinksHome / News / View News

Simple workarounds for a visual problem when toggling a ContextMenu MenuItem's IsEnabled property directly

+ Add to SilverlightShow Favorites
0 comments   /   posted by Silverlight Show on May 05, 2010
(0 votes)
If you have a problem with the new ContextMenu control when toggling the IsEnabled property of a MenuItem directly, take a look at this post of David Anson in which he suggests some easy workarounds.

A few days ago, Martin Naughton and Tiago Halm de Carvalho e Branco independently contacted me to report a problem they were having with the new ContextMenu control in the April '10 release of the Silverlight Toolkit. In both cases, they were toggling the IsEnabled property of a MenuItem directly and reported that the control's visuals weren't updating correctly. I was a little surprised at first because I knew I'd tested dynamic changes to the enabled state and I'd seen them work properly. But once I created a test project to investigate the report, I saw how the problem scenario was different.

Share


Comments

Comments RSS RSS
No comments

Add Comment

 
 

   
  
  
   
Please add 1 and 8 and type the answer here:

Join the free SilverlightShow webinar 'Silverlight's Power Features: Data Binding in Action' on August 19th 2010, 10:00 am PDT.
In this session Gill Cleeren will make with a complete overview of the data binding features Silverlight 4 has to offer. He will discuss how data binding is the enabler for applying the MVVM pattern and commanding, and will end up reviewing Blend's support for data binding, including the use of design-time data. Read more | Register Now (hide this)