the problem is the wpf not save changes Only after the end of the event
//code
private void button1_Click(object sender, RoutedEventArgs e)
{
for (int ii = 0; ii <= 5; ii++)
{
Rectangle rectr = (Rectangle)FindName("rect" + ii);
rectr.Fill = Brushes.Black;
// need some thing to save changes here
Thread.Sleep(100);
}
}
the question is how to save changes
all i need change the background color of each rectangle and sleep some time then change the next rectangle