RSS

Tag Archives: mouse enter

Hover Intent for Silverlight

Updated: Now on GitHub: https://github.com/cairey/Hover-Intent-Silverlight

You have probably already used the Hover intent plugin for JQuery. Maybe you want to do the same thing for Silverlight? Well using the reactive extensions you can quite easily. Of course we are using MVVM so we can capture the elements mouse enter event and bind a command to it on the view model.

You can then bind in the XAML like so:
Button x:Name="Eyecon" commands:MouseEnterIntent.Command="{Binding Open}" commands:MouseEnterIntent.DueTime="50"

The MouseEnterIntent class creates the attached behavior using dependency properties. The MouseEnterIntentCommandBehavior class bind the events to the command.

 
Leave a comment

Posted by on September 21, 2010 in C# Development, Silverlight, Websites

 

Tags: , , , , , , , ,