I have a for loop where I calculate the value of something and display it, for example
void Button_Click(object sender, RoutedEventArgs e)
{
InitializeComponent();
Random rand = new Random();
for (i = 0; i <= 30; i++)
{
rnd = rand.Next(1,10);
value += i + rnd;
display.Content = value;
}
}
The problem is, I want to see the value overwritten after each cycle, delayed by X seconds, how could I achieve that in WPF?