Behaviors vs Subclassing in Silverlight
Posted by: Bryant Likess Blog,
on 30 Sep 2009 |
View original | Bookmarked: 1 time(s)
As a Silverlight developer, when you want to add functionality to an existing control, you have two main options as I see it (if you want to get reuse from your code). You can either subclass the control or, as of Silverlight 3, you can write a behavior for it. For example, one of the requests for the current Silverlight application that Ive been working on was to have the TextBox select all the text when you tabbed to it or clicked in it. We can easily add this functionality using both of...