| 123456789101112131415161718192021222324252627 |
- using System;
- using System.Collections.Generic;
- using System.Globalization;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows.Data;
- using System.Windows.Media;
- namespace SummaryModule.Converter;
- internal class BoolToLight : IValueConverter
- {
- public object? Convert(object? value, Type targetType, object parameter, CultureInfo culture)
- {
- if (value is not bool b)
- return default;
- return b ? (SolidColorBrush)Application.Current.FindResource("NormalColor") : (SolidColorBrush)Application.Current.FindResource("DisableColor");
- }
- public object? ConvertBack(object? value, Type targetType, object parameter, CultureInfo culture)
- {
- return default;
- }
- }
|