The property, AssociatedObject, returns the object to which the System.Windows.Interactivity.Behavior is attached. In our case, it's the TextBlock control passed as Behavior of type T (Behavior<TextBlock>), which is associated in the XAML code block, as mentioned here:
<TextBlock Text="Hover to Grow the size!" HorizontalAlignment="Center" VerticalAlignment="Center"> <i:Interaction.Behaviors> <b:GrowTextBehavior GrowBySize="10"/> </i:Interaction.Behaviors> </TextBlock>
When the association happens between the control and the component, it registers the two events (MouseEnter and MouseLeave) in our example. Now, when you hover over the mouse on top of the TextBlock, it gets the dynamic association of the events and triggers them. This way, it gets notification of the event and performs based on the logic specified.
You can now associate this behavior...