Monday, January 9, 2012

[Silverlight]Attach Behavior in code

It's easy to attach Behavior in code.
Just do this
LikeBehavior likeBehavior = new LikeBehavior();
likeBehavior.Attach(dependencyObject);
Where LikeBehavior is a behavior.

No comments:

Post a Comment