|
12345678910111213141516171819202122232425 |
- using System;
- using System.Windows.Data;
-
- namespace XHZB.Desktop.Utils
- {
- public class ColorBgConverter : IValueConverter
- {
- public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
- {
- int v = int.Parse(value.ToString());
- if (v == 0)
- {
- return "#ffffff";
- }
- else
- {
- return "#4597FF";
- }
- }
- public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
- {
- return null;
- }
- }
- }
|