I want to handle mouse over and mouse out events for a grid. Does WPF have events for this.
Note: I dont want to use IsMouseOver property in my style.
i have used MouseEnter and MouseLeave method but without much success.
Wpf – Event for MouseOver action in WPF
wpf
Best Answer
You can use EventTriggers to capture MouseEnter and MouseLeave events in XAML.
Here is a simple example that changes the background of a StackPanel in a Grid: