XAML-Map-Control/MapControl/Shared/UpdateTimer.cs
2025-10-26 17:52:54 +01:00

29 lines
473 B
C#

#if WPF
using System.Windows.Threading;
#elif UWP
using Windows.UI.Xaml;
#elif WINUI
using Microsoft.UI.Xaml;
#elif AVALONIA
using Avalonia.Threading;
#endif
namespace MapControl
{
internal class UpdateTimer : DispatcherTimer
{
public void Run(bool restart = false)
{
if (restart)
{
Stop();
}
if (!IsEnabled)
{
Start();
}
}
}
}