client/src/Iri.Modernisation.Controls/View/ContextualLinkBinder.xaml.cs
changeset 28 2d4ec5ab2a40
parent 13 b5ee436add3d
--- a/client/src/Iri.Modernisation.Controls/View/ContextualLinkBinder.xaml.cs	Mon Jan 04 10:29:39 2010 +0100
+++ b/client/src/Iri.Modernisation.Controls/View/ContextualLinkBinder.xaml.cs	Tue Jan 05 15:53:48 2010 +0100
@@ -19,21 +19,26 @@
     public partial class ContextualLinkBinder : UserControl
     {
 
-        public PolemicElementType PolemicType
+        public PolemicTypeDescription PolemicType
         {
-            get { return (PolemicElementType)GetValue(_polemicType); }
+            get { return (PolemicTypeDescription)GetValue(_polemicType); }
             set
             {
                 
                 SetValue(_polemicType, value);
-                PolemicTypeColorConverter converter = new PolemicTypeColorConverter();
-                path9020.Stroke = PolemicTypeColorConverter.Convert(value);
+                //PolemicTypeColorConverter converter = new PolemicTypeColorConverter();
+                path9020.Stroke = new SolidColorBrush(value.Color);
 
             }
         }
 
         public static readonly DependencyProperty _polemicType =
-            DependencyProperty.Register("PolemicType", typeof(PolemicElementType), typeof(ContextualLinkBinder), new PropertyMetadata(PolemicElementType.Basic));
+            DependencyProperty.Register("PolemicType", typeof(PolemicTypeDescription), typeof(ContextualLinkBinder), new PropertyMetadata(new PropertyChangedCallback(PolemicTypeChanged)));
+        private static void PolemicTypeChanged(DependencyObject sender, DependencyPropertyChangedEventArgs e)
+        {
+
+            ((ContextualLinkBinder)sender).path9020.Stroke = new SolidColorBrush((((PolemicTypeDescription)e.NewValue)).Color);
+        }
 
         /* public Brush ArrowColor
          {