Mouse Enter and leave a Border //File:Window.xaml.cs using System; using System.Windows; using System.Windows.Controls; using System.Windows.Input; using System.Windows.Media; namespace WpfApplication1 { public partial class Window1 : Window { public Window1() { InitializeComponent(); } void OnMouseEnterHandler(object sender, MouseEventArgs e) { border1.Background = Brushes.Red; } void OnMouseLeaveHandler(object sender, MouseEventArgs e) { border1.Background = Brushes.White; } } }