WPF Commands - Invocation of Handlers
I am a beginner to WPF. I read about commands , when do the handlers for the command get triggered, because i attached a Coomand for the button and a menu , the handler is invoke开发者_开发知识库d either the menu or the button is clicked. Is it possible to invoke the handler on double clicking the button.
If i understood the query properly then you are trying to attach the same command to both a button and a menu.Then i should say the command will get executed for both the cases.
Check the following links.
http://joshsmithonwpf.wordpress.com/2008/03/18/understanding-routed-commands/
http://www.codeproject.com/KB/WPF/WPFCommandingTheBasic.aspx
http://www.codeproject.com/KB/WPF/WpfCommandPatternApplied.aspx
In the case of double click Check the link below
http://www.thejoyofcode.com/Invoking_a_Command_on_a_Double_Click_or_other_Mouse_Gesture.aspx
Also go through Marlon Grech's attached command behaviors .It will give you a handfull of added functionalities
This will get you started for sure.Hope it helps
精彩评论