client/src/Iri.Modernisation.Controls/ViewModel/PolemicElementVM.cs
changeset 28 2d4ec5ab2a40
parent 27 f292db96b050
child 29 5f8d275750e7
--- a/client/src/Iri.Modernisation.Controls/ViewModel/PolemicElementVM.cs	Mon Jan 04 10:29:39 2010 +0100
+++ b/client/src/Iri.Modernisation.Controls/ViewModel/PolemicElementVM.cs	Tue Jan 05 15:53:48 2010 +0100
@@ -188,12 +188,23 @@
         /// <summary>
         /// PolemicType de l'élément
         /// </summary>
+        private Color _type;
         public SolidColorBrush Type
         {
             get
             {
-                return new SolidColorBrush(Chapter.Color);
+                if (_element is SegmentIndex)
+                {
+                    return new SolidColorBrush(Chapter.Color);
+                }
+                else
+                {
+                    return new SolidColorBrush(_type);
+                }
+             
             }
+            
+            
         }
         private PolemicElement _element { get; set; }
 
@@ -213,6 +224,10 @@
             Chapter = _element.Chapter;
             DisplayTimer.Interval = new TimeSpan(0, 0, 0, 0, 500);
             DisplayTimer.Tick += new EventHandler(myDispatcherTimer_Tick);
+            if (_element is Annotation)
+            {
+                _type = ((Annotation)_element).Type.Color;
+            }
         }
         
         /// <summary>