|
1234567891011121314151617181920 |
- using System;
- using System.Windows.Data;
- using System.Windows.Media;
-
- namespace ComeCapture.Converters
- {
- public class ColorConverter : IValueConverter
- {
- public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
- {
- // ReSharper disable once PossibleNullReferenceException
- return new SolidColorBrush((Color)System.Windows.Media.ColorConverter.ConvertFromString(value.ToString()));
- }
-
- public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
- {
- return null;
- }
- }
- }
|