void button_close_MouseEnter(object sender, MouseEventArgs e) { if (IsSelected) { _btnClose.Foreground = Brushes.White; return; } _btnClose.SetResourceReference(ForegroundProperty, VsBrushes.CommandBarTextActiveKey); }