12345678910111213141516171819202122232425262728293031323334353637383940 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows.Data;
- using System.Windows.Media;
- namespace CyberX8_Themes.Converters
- {
- public class BoolToColor : IValueConverter
- {
- public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
- {
- return value!=null? ((bool)value ? new SolidColorBrush(Colors.Lime) : new SolidColorBrush(Colors.Gray)) : new SolidColorBrush(Colors.Gray);
- }
- public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
- {
- return null;
- }
- }
- public class BoolToColor8 : IValueConverter
- {
- public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
- {
- return value != null ? ((bool)value ? new SolidColorBrush(Colors.Transparent) : new SolidColorBrush(Colors.Gray)) : new SolidColorBrush(Colors.Transparent);
- }
- public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
- {
- return null;
- }
- }
- }
|