Prevent Key Default in Silverlight
I'm having the following problem, I have a textbox and I want to tebla Tab precione when a particular action occurs, but the focus must be maintaine开发者_如何学JAVAd. I've tried e.Handled = true; but still continues by setting the focus to the next element. How can I avoid this?
Thanks
void textBox_KeyDown(object sender, KeyEventArgs e)
{
if(e.Key == Key.Tab)
e.Handled = true;
}
This does work in Silverlight 4. If I press tab on the textbox, nothing happens.
精彩评论