开发者

Prevent Key Default in Silverlight

开发者 https://www.devze.com 2023-02-07 22:29 出处:网络
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'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

精彩评论

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