c# - Getting KeyInput in Silverlight -
trying catch keyinput in silverlight application gives me problems because of focus of controls. page consists of multiple controls every time diffent control has focus , keydownevent fails. 1 possibility assing keydown event controls , method processes them. there better way?
you catch keydown in page contains controls overriding onkeydown.
protected override void onkeydown(keyeventargs e) { // distribute listeners here }
this works since controls on page bubbles event upwards if control (like textbox/button etc) doesn't handle keypress parent control gets chance.
Comments
Post a Comment