The objective of this article series is to give a quick overview of Behaviors, Triggers and Actions in Silverlight and WPF. Together, they enable a great deal of design time interactivity for your UI. They also make possible re-use and re-distribution of interaction logic. This is the first article in the series, and I’ll explain about Behaviors, and also we’ll create a custom behavior.
In this post, we’ll play around with Microsoft Expression Blend 4.0 beta a bit, to help us understand the concept further. So, if you don’t have Blend 4.0 beta,
- Download Blend 4.0 Beta here and install it, it is a free evaluation version.
Note: Why this post? After publishing my Silverlight and WPF interaction frameworks, Silverlight Experimental Hacks (Slex) and WPF Experimental Hacks (Wex), I got a number of requests from the community to write few simple posts on these topics, introducing the basic concepts. So here we go.
Behaviors – Scratching the Surface
A behavior is something you attach to an element, modifying the way how it should present itself, or how it should respond to user interactions. First, Let us add an existing behavior to an object to see how behaviors work. Later we’ll create a custom behavior and may use the same from Blend.
from Anoop Madhusudanan more here