PopupMenuItem IsEnabled issue with bound value

Nov 5, 2010 at 7:08 AM

I noticed today that a PopupMenuItem didn't "gray" out when you set the IsEnabled value it was bound to is false.

Basically here are the scenarios:

  • Works:<PopupMenuItem IsEnabled="False />
  • Works:<PopupMenuItem IsEnabled="{Binding Path=BooleanProperty}" />
  • Fails: <PopupMenuItem IsEnabled="{Binding Path=Object.BooleanProperty}" />

Well done on a really nice project. The control is implemented in a clever way in that you declare it separately from it's usage environment which is then hooked via your XXXXElements property. Really clever.


Nov 5, 2010 at 7:35 AM

Apologies... this does in fact work correctly. I had made a binding source mistake.

Something that did appear strange was the <PopupMenuItem /> only changed the visual "gray" to "black" when hovering over them. It's asif the change binding value doesn't update the visuals.