22 October 2010

Problem in KeyBinding constructor in WPF

Basically Implementation#01 and Implementation#02 should be same. But Implementation sometimes gets exception if modifiers = ModifierKeys.None.


//Implementation # 01:
KeyBinding k = new KeyBinding(command, key, modifiers);

//Implementation # 02:
KeyBinding keyBinding = new KeyBinding();
keyBinding.Command = command;
keyBinding.Key = key;
keyBinding.Modifiers = modifiers;


So, use the 2nd way of implementation if required.

 

© 2007 t!ps n tr!cks: October 2010



Template unik dari rohman


---[[ Skip to top ]]---