Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
144619 | May 15,2019 12:11 AM UTC | May 22,2019 05:55 AM UTC | Xamarin.Forms | 3 |
![]() |
Tags: SfChart |
Device.BeginInvokeOnMainThread(() =>
{
InitializeTimer();
});
…
…
private async void InitializeTimer()
{
await WaitAndExecute(1000, () =>
{
//Update the chart here.
// Use SuspendSeriesNotification and ResumeSeriesnNotification for better performance.
Chart.SuspendSeriesNotification();
viewModel.Update();
Chart.ResumeSeriesNotification();
InitializeTimer();
});
}
private async Task WaitAndExecute(int milisec, Action actionToExecute)
{
await Task.Delay(milisec);
actionToExecute();
}
|
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.
This page will automatically be redirected to the sign-in page in 10 seconds.