Exploring keyboard events


show more Exploring keyboard events provides you with in-depth training on Developer. Taught by Walt Ritscher as part of the Silverlight 5 Essential Training show less
please wait ...

Exploring keyboard events

The text box is one of the controls available for gathering text input in Silverlight. It has a few interesting events. Let's see what they are. I am going to look at these events in the DetailingKeyEvents project. I'm in this page called MainPage.xaml which has three or four text boxes on the user interface. I am going to start by looking at this first text box. It has the TextChanged event. The TextChanged event fires every time a character in the text box is changed. I am going to show you what I mean.

I'll go to my code behind. Down here in the TextBox_TextChanged event handler, I'm adding a string to the ListBox every time this event fires. When I run the application by pressing F5, and I type a character in here, you see that the TextChanged event fired. If I type another character in, again, it fires. If I copy these two characters, Ctrl+C and delete the item, again, the TextChanged fires.

Now, I am going to paste those two characters in with the Ctrl+V and one more time t...

Exploring keyboard events
Video duration: 4m 4s 8h 52m Beginner

Viewers:

Exploring keyboard events provides you with in-depth training on Developer. Taught by Walt Ritscher as part of the Silverlight 5 Essential Training

Subject:
Developer
Software:
Silverlight Visual Studio
Author:
please wait ...