internal void SetToolTipTimer() { // substract the duration of the close animation from the display time, // to match with the value set by the user in the ToolTip.DisplayTime property // var tooltipDisplayDuration = DisplayTime; // if (CloseAnimation != null) // tooltipDisplayDuration = tooltipDisplayDuration.Subtract(CloseAnimation.Duration); var maximumTime = !DisplayTime.HasTimeSpan ? TimeSpan.MaxValue : DisplayTime.TimeSpan; var timer = new ToolTipTimer(maximumTime, InitialDelay.TimeSpan); if (Timer != null) { // clean up old instance Timer.StopAndReset(); timer.Tick -= ToolTipService.OnTimerTick; timer.Stopped -= ToolTipService.OnTimerStopped; } timer.Stopped += ToolTipService.OnTimerStopped; timer.Tick += ToolTipService.OnTimerTick; Timer = timer; }