public static void SetTimeout(int milliseconds, Action func) { var timer = new DispatcherTimerContainingAction { Interval = new TimeSpan(0, 0, 0, 0, milliseconds), Action = func }; timer.Tick += _onTimeout; timer.Start(); }
public UiHelper() { timer = new DispatcherTimerContainingAction(); }