zoukankan      html  css  js  c++  java
  • 注意:匿名事件处理函数

     

    if (button != null && button.m_defaultMenuItem != menuItem)
                {
          

                   button.m_defaultMenuItem.IsEnabledChanged += delegate(object o, DependencyPropertyChangedEventArgs args)
                    {
                        MenuItem currentMenu = o as MenuItem;
                         contentControl.IsEnabled = (bool)args.NewValue;
                    };

              }

    改为:

    if (button != null && button.m_defaultMenuItem != menuItem)
                {
          

                   button.m_defaultMenuItem.IsEnabledChanged += delegate(object o, DependencyPropertyChangedEventArgs args)
                    {
                        MenuItem currentMenu = o as MenuItem;
                        if (contentControl != null && button.m_defaultMenuItem == currentMenu)
                            contentControl.IsEnabled = (bool)args.NewValue;
                    };

              }

  • 相关阅读:
    flex>导航
    flex>图表控件
    Struts2>Cannot find the tag library descriptor for /strutstags
    jsp>Smartupload例子代码
    flex>MXML语法
    解决JBoss只能通过localhost(127.0.0.1)而不能通过IP访问
    jsp>tomcat配置虚拟目录
    JSF>概述
    Struts2>中文乱码
    flex>HttpService
  • 原文地址:https://www.cnblogs.com/liangouyang/p/1314988.html
Copyright © 2011-2022 走看看