In my Windows Phone 7 app, I want `ContentPanel`'s background to change its color within a specified time (3 seconds in this case). Basically I want it to be "**flashing**". 

But the problem is that the changes do not appear while the loop is working, the color changes only once, after the loop is done working. Why?

```
byte R;
TimeSpan ts = new System.TimeSpan(0, 0, 0, 3);
DateTime dt1 = new DateTime();           
DateTime dt2 = new DateTime();    

requirement = true;
while (requirement)
{ 
    R = Convert.ToByte(0.5 * 255 * (1 + Math.Sin(DateTime.Now.Millisecond)));
    ContentPanel.Background = new SolidColorBrush(Color.FromArgb(255, R, 125, 70));
    dt1 = DateTime.Now;
    dt2 = DateTime.Now;
    dt2.Subtract(dt1);
    if (dt2.Subtract(ts).CompareTo(dt1) > 0) requirement = false;
 }

```

Is it even possible?