在 Xamarin Forms 中更改 Device.StartTimer() 间隔而 运行
Change Device.StartTimer() interval while running in Xamarin Forms
我正在寻找一种在计时器为 运行 时更改间隔的方法。
我没有在 Microsoft 文档中找到解决方案,也没有在 Google.
上找到解决方案
这真的可能吗?
Device.StartTimer(TimeSpan.FromSeconds(10), () =>
{
... Change interval here, for example to 8 seconds
}
只需启动一个新计时器。
我正在寻找一种在计时器为 运行 时更改间隔的方法。 我没有在 Microsoft 文档中找到解决方案,也没有在 Google.
上找到解决方案这真的可能吗?
Device.StartTimer(TimeSpan.FromSeconds(10), () =>
{
... Change interval here, for example to 8 seconds
}
只需启动一个新计时器。