/// <summary> /// Refresh the UI Elements for the Mini Timer Display. /// </summary> /// <param name="remaining">About of Time Remaining in the Current Operation (Tomato/Break/Set Break).</param> /// <param name="progress">Percent of Operation Complete (0-100)</param> public void Update(TimeSpan remaining, int progress) { if (progress < 0) progress = 0; if (progress > 100) progress = 100; // Refresh UI Elements Based on var time = remaining.ToFriendly(); LblTimeRemaining.Content = time; Background = new SolidColorBrush(endBGColor.FadeToColor(startBGColor, progress)); LblTimeRemaining.Foreground = new SolidColorBrush(endFGColor.FadeToColor(startFGColor, progress)); LblViewBox.UpdateLayout(); }