DevExpress.XtraNavBar.NavBarControl 模拟单击导航的选项事件

        /// <summary>
        /// DevExpress.XtraNavBar.NavBarControl 模拟单击导航的选项事件      
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void simpleButton1_Click(object sender, EventArgs e)
        {
            //       Simulates the Click event for the current object.
            navBarControl1.Groups[0].ItemLinks[0].PerformClick();//触发navBarItem1_LinkClicked
        }

        /// <summary>
        /// 手动单击navBarItem1 或 模拟单击触发
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void navBarItem1_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            Console.WriteLine("navBarItem1_LinkClicked");
        }

 

posted @ 2017-05-14 12:24  一路来过  阅读(2988)  评论(0编辑  收藏  举报