I'm creating an application, where you have a WebView that needs to be updated from 5 in 5 seconds while the Switch is checked, and when you uncheck it, it should do the page stops loading.
I tried to use a while, but the application is waiting while while it freezes, if they can help me with this problem I will be very grateful!
My current code:
nswtURL.Click += delegate
{
if (nswtURL.Checked)
{
//true
nWebView.LoadUrl(URL);
while(nswtCamera.Checked)
{
nWebView.Reload();
Thread.Sleep(5);
}
}
else
{
//false
nWebView.StopLoading();
}
};