星火直播PC
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ColorTextConverter.cs 669B

12345678910111213141516171819202122232425
  1. using System;
  2. using System.Windows.Data;
  3. namespace XHZB.Desktop.Utils
  4. {
  5. public class ColorTextConverter : IValueConverter
  6. {
  7. public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
  8. {
  9. int v = int.Parse(value.ToString());
  10. if (v == 0)
  11. {
  12. return "#333333";
  13. }
  14. else
  15. {
  16. return "#ffffff";
  17. }
  18. }
  19. public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
  20. {
  21. return null;
  22. }
  23. }
  24. }