|
28
|
1 |
using System; |
|
|
2 |
using System.Net; |
|
|
3 |
using System.Windows; |
|
|
4 |
using System.Windows.Controls; |
|
|
5 |
using System.Windows.Documents; |
|
|
6 |
using System.Windows.Ink; |
|
|
7 |
using System.Windows.Input; |
|
|
8 |
using System.Windows.Media; |
|
|
9 |
using System.Windows.Media.Animation; |
|
|
10 |
using System.Windows.Shapes; |
|
|
11 |
using System.Windows.Data; |
|
|
12 |
namespace Iri.Modernisation.Controls.Converter |
|
|
13 |
{ |
|
|
14 |
public class ColorToSolidBrush : IValueConverter |
|
|
15 |
{ |
|
|
16 |
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) |
|
|
17 |
{ |
|
|
18 |
return new SolidColorBrush((Color)value); |
|
|
19 |
|
|
|
20 |
} |
|
|
21 |
|
|
|
22 |
public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) |
|
|
23 |
{ |
|
|
24 |
return ((SolidColorBrush)value).Color; |
|
|
25 |
|
|
|
26 |
} |
|
|
27 |
} |
|
|
28 |
} |