title: How to change a fill color for an ellipse in discrete steps in c# WPF
body: <p>I have a list of boolean values named <strong>Sequence</strong>. I want to change the color of a shape based on the values of the list, that is, I want to iterate through the values of the list and fill the shape with a certain color (for example yellow) every time I stumble upon a True value and change the color of the filling (to blue) every time I stumble upon a False value. I have tried doing it like this: </p>
  
  <pre><code>foreach(bool element in Sequence)
  {
      if(element){ ellipse.Fill = new SolidColorBrush(Colors.Yellow); }
      else{ ellipse.Fill = new SolidColorBrush(Colors.Blue); }
      int milisecond = 200;
      Thread.Sleep(miliseconds);
  }
  </code></pre>
  
  <p>But still the colors won't alternate.</p>
  
  <p>Here's the XAML:</p>
  
  <pre><code>`&lt;Ellipse x:Name="elipse" Height="100" Margin="151,52,0,0" Stroke="Black" Width="100" /&gt; `
  </code></pre>
  
  <p>Do I need a trigger?, What am I doing wrong?.
  Thank you in advance, and excuse my bad english if something seems funny.</p>