17 namespace Iri.Modernisation.Controls.View |
17 namespace Iri.Modernisation.Controls.View |
18 { |
18 { |
19 public partial class ContextualLinkBinder : UserControl |
19 public partial class ContextualLinkBinder : UserControl |
20 { |
20 { |
21 |
21 |
22 public PolemicElementType PolemicType |
22 public PolemicTypeDescription PolemicType |
23 { |
23 { |
24 get { return (PolemicElementType)GetValue(_polemicType); } |
24 get { return (PolemicTypeDescription)GetValue(_polemicType); } |
25 set |
25 set |
26 { |
26 { |
27 |
27 |
28 SetValue(_polemicType, value); |
28 SetValue(_polemicType, value); |
29 PolemicTypeColorConverter converter = new PolemicTypeColorConverter(); |
29 //PolemicTypeColorConverter converter = new PolemicTypeColorConverter(); |
30 path9020.Stroke = PolemicTypeColorConverter.Convert(value); |
30 path9020.Stroke = new SolidColorBrush(value.Color); |
31 |
31 |
32 } |
32 } |
33 } |
33 } |
34 |
34 |
35 public static readonly DependencyProperty _polemicType = |
35 public static readonly DependencyProperty _polemicType = |
36 DependencyProperty.Register("PolemicType", typeof(PolemicElementType), typeof(ContextualLinkBinder), new PropertyMetadata(PolemicElementType.Basic)); |
36 DependencyProperty.Register("PolemicType", typeof(PolemicTypeDescription), typeof(ContextualLinkBinder), new PropertyMetadata(new PropertyChangedCallback(PolemicTypeChanged))); |
|
37 private static void PolemicTypeChanged(DependencyObject sender, DependencyPropertyChangedEventArgs e) |
|
38 { |
|
39 |
|
40 ((ContextualLinkBinder)sender).path9020.Stroke = new SolidColorBrush((((PolemicTypeDescription)e.NewValue)).Color); |
|
41 } |
37 |
42 |
38 /* public Brush ArrowColor |
43 /* public Brush ArrowColor |
39 { |
44 { |
40 get { return path9020.Stroke; } |
45 get { return path9020.Stroke; } |
41 set { path9020.Stroke = value; } |
46 set { path9020.Stroke = value; } |