Binding TextBlock with KeyDown event

i am using textblock for capturing input from keyboard, but problem is how do i refresh its content, i am doing the way given below, but then it doesnot works for space, enter or any other sytemkey, how do i go about it

TextBlock tb

KeyDown event of windows:

tb.Text = tb.Text + e.Key.ToString();



Answer this question

Binding TextBlock with KeyDown event

  • Brad Harris

    Why aren't you just using a TextBox If you don't want it to look like a "normal" TextBox just restyle it, but you definitely seem to want the behavior of a TextBox.

    -Drew


  • Binding TextBlock with KeyDown event