|
123456789101112131415161718192021222324252627 |
- using System;
- using System.Globalization;
- using System.Windows.Data;
- using System.Windows.Media;
-
- namespace BPASmartClient.FoodStationTest.Converter
- {
- public class DataTableRedundantConverter : IValueConverter
- {
- public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
- {
- if (value != null && value is bool bit)
- {
- if (bit)
- return new SolidColorBrush(Color.FromArgb(255, 245, 63, 98));
- else
- return new SolidColorBrush(Color.FromArgb(255, 42, 178, 231));
- }
- return default;
- }
-
- public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
- {
- throw new NotImplementedException();
- }
- }
- }
|