I have a problem with the progress bars, I want to run two progress bar like I do in the following code:
namespace probando
{
public partial class MainWindow : Window
{
int sec = 0;
public MainWindow()
{
InitializeComponent();
}
private void button_Click(object sender, RoutedEventArgs e)
{
string stringSec = sec.ToString();
for (int i = 0; i <= sec; i++)
{
masuno(i,sec);
}
}
private void Tiempo_segundos_ValueChanged(object sender, RoutedPropertyChangedEventArgs<double> e)
{
sec = (int) Tiempo_segundos.Value;
}
private void masuno(int i, int sec)
{
Porcentaje_restante.Maximum = sec;
Porcentaje_restante.Dispatcher.Invoke(() => Porcentaje_restante.Value = i, DispatcherPriority.Background);
Thread.Sleep(1000);
}
}
}
And I have another progressbar which is indeterminate buy doesn´t work while the first bar is working.
Thank you for your help.