#662 – IsMouseOver Property
October 5, 2012 3 Comments
Every UIElement object has an IsMouseOver property that indicates whether or not the mouse is currently located over the element.
In the example below, we define a Label whose content is bound to the current state of the IsMouseOver property for a Button.
<StackPanel Margin="20"> <Button Name="btn1" Content="Move Mouse Over Me !" HorizontalAlignment="Center" Padding="10,5"/> <Label Content="{Binding ElementName=btn1, Path=IsMouseOver}" Foreground="Green"/> </StackPanel>