Burak Seyhan

Burak Seyhan

  • NA
  • 321
  • 30.2k

Wpf CheckBox Problem

Sep 16 2015 4:46 AM
Hi ,
 
I developed wpf application. I have to display user status with images.
 
private void cbVoice_Click(object sender, RoutedEventArgs e)
{
LoginServerStatus status = new LoginServerStatus();
BitmapImage logo = new BitmapImage();
logo.BeginInit();
logo.UriSource = new Uri("Resources/Content/green.png", UriKind.Relative);
logo.EndInit();
imgVoice.Source = logo;
}
private void cbVoice_Unchecked(object sender, RoutedEventArgs e)
{
BitmapImage logo = new BitmapImage();
logo.BeginInit();
logo.UriSource = new Uri("Resources/Content/red.png", UriKind.Relative);
logo.EndInit();
imgVoice.Source = logo;
}
 
When I check the checkbox, check event works . However unchecked method works but Image doesn't update. Why and How can i fixed the problem?_
 
 
Thanks 

Answers (7)