WarningIsValidConverter.cs 825 B

12345678910111213141516171819202122232425
  1. using Muchinfo.MTPClient.Resources;
  2. using System;
  3. using System.Windows.Data;
  4. namespace Muchinfo.MTPClient.Infrastructure.Converters
  5. {
  6. public class WarningIsValidConverter : IValueConverter
  7. {
  8. public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
  9. {
  10. string result = string.Empty;
  11. if (value != null)
  12. {
  13. var isValid = (bool)value;
  14. result = isValid ? Client_Resource.Infrastructure_Yes : Client_Resource.Infrastructure_No;
  15. }
  16. return result;
  17. }
  18. public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
  19. {
  20. throw new NotImplementedException();
  21. }
  22. }
  23. }