2010-02-18 164 views

回答

10

很容易。訂閱MenuItemSubmenuOpened事件。傳統的方式來做到這一點:

MidItem.SubmenuOpened += new RoutedEventHandler(MidItem_SubmenuOpened); 

private void MidItem_SubmenuOpened(object sender, RoutedEventArgs e) 
{ 
    //Menu Open Logic Here 
} 

還是酷動方法:

MidItem.SubmenuOpened += delegate(object sender, RoutedEventArgs e) 
{ 
    //Menu Open Logic Here 
};