Let's do a simple user interaction with silverlight.
I will take the example code from the previous post and add some extra attributes to the TextBlock Elements:
I have added the "x:Name" attribute, which will identify the textBlock in the code-behind file.
And also I have set the style of the cursor. I personally think that when there is some interaction with user, one should be reminded for that!
The next is simple MouseEventHandler in the code-behind file:
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgCpKbYVTs_1RoAXGEmwTfRvLpcYDToOiOm2PejNcZ6u0R5XeiiecLhjedUZ_CQxknypoU9JAxs9ARVvQT_f03CXkfkdfFUPluvYsd_sdVop8Ujn-1Xx7beDn3dF9l8ftsgPJT6-FFkzn3-/s320/code_behind.gif)
No comments:
Post a Comment