Let's start by creating a component which will add a Size Grow effect to a TextBlock control when hovering over with the mouse cursor. To do this, perform the following steps:
- To create and/or use behaviors in an application, you will need to set up the project to have a reference to the System.Windows.Interactivity.dll assembly file. To do this, right-click on the project and click Add | Reference... from the context menu.
- From the Reference Manager dialog, search for interactivity to find the System.Windows.Interactivity assembly in the list of assemblies. Select the latest version, as shown in the following screenshot, and click OK. Make sure you verify the added reference in the project:
- Now open the MainWindow.xaml page and add a TextBlock control inside the default Grid. Assign a string to its Text property:
<Grid> <TextBlock Text="Hover to Grow the size!" HorizontalAlignment="Center" VerticalAlignment...