开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜