async public static Task SetText(string text, int time, CancellationToken token) { TextSpot.Text = ""; foreach (char s in text) { if (token.IsCancellationRequested) { TextSpot.Text = text; break; } TextSpot.Text += s; if (s == ' ') { continue; } await Task.Delay(time); } TextAnimationComplete?.Invoke(); }
public static void SetText(string text) { TextSpot.Text = text; TextAnimationComplete?.Invoke(); }