我正在使用Xamarin.forms(PCL),我需要每隔几秒刷新/更新内容页面及其数据.该数据是从检索API的viewmodel.
有没有可以定期使用的调用任何方法或处理Get Api周期里面page.xaml.cs,是这样的:
methodRunPeriodically()
{
userdata = await UserService.GetUserasync(_UserViewModel.EmployeeId);
}
Run Code Online (Sandbox Code Playgroud)