silverlight ContextMenu MenuItem IsEnabled 设置后界面不刷新

在silverlight中使用菜单结果发现设置IsEnabled 界面不刷新,只有鼠标划过后才更新。百思不得其解。最后找到解决方案:

http://dlaa.me/blog/post/10007250

 

我是使用Set the MenuItemIsEnabledWorkaround.IsActive attached property这种方法解决的。

BTW: Template这方法是有bug的 对我来说。

posted @ 2017-03-07 17:26  胖胖仔  阅读(180)  评论(0编辑  收藏  举报