MessageReadStatusConverter.cs 1006 B

12345678910111213141516171819202122232425262728293031
  1. using System;
  2. using System.Windows.Data;
  3. namespace Muchinfo.MTPClient.Infrastructure.Converters
  4. {
  5. public class MessageReadStatusConverter : IValueConverter
  6. {
  7. public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
  8. {
  9. string result = string.Empty;
  10. if (value != null)
  11. {
  12. bool bo = (bool)value;
  13. if (bo)
  14. {
  15. result = "pack://application:,,,/Client.Main;component/Images/CoolBlack/info.png";
  16. }
  17. else
  18. {
  19. result = "pack://application:,,,/Client.Main;component/Images/CoolBlack/info_d.png";
  20. }
  21. }
  22. return result;
  23. }
  24. public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
  25. {
  26. throw new NotImplementedException();
  27. }
  28. }
  29. }