WPF: i have a button and the image was set in code behind c#
btn.Content = new Image
{
Source = new BitmapImage(new Uri(MasterVariables.applicationPath + "Normal.png")),
Stretch = Stretch.Fill,
};
now problem is while over into the button the background color set as blue but i change the image in mouse_enter event
btn.BorderThickness = new Thickness(0);
btn.Style = (Style)FindResource(ToolBar.ButtonStyleKey);
btn.Background = Brushes.White; btn.BorderBrush = Brushes.Transparent;
btn.Content = new Image
{
Source = new BitmapImage(new Uri(MasterVariables.applicationPath + "Hover.png")),
Stretch = Stretch.Fill,
};
the image was change but while over into mouse the backgrounded is highlighted in blue color