@@ -1603,16 +1603,18 @@ private static void OnTooltipTextChanged(DependencyObject d, DependencyPropertyC
1603
1603
/// <param name="newValue">new value</param>
1604
1604
protected virtual void OnTooltipTextChanged ( string oldValue , string newValue )
1605
1605
{
1606
- var timer = tooltipTimer ;
1607
- if ( timer == null )
1606
+ // There are cases where oldValue is null and newValue is string.Empty
1607
+ // and vice versa, simply ignore when string.IsNullOrEmpty for both.
1608
+ if ( string . IsNullOrEmpty ( oldValue ) && string . IsNullOrEmpty ( newValue ) )
1608
1609
{
1609
1610
return ;
1610
1611
}
1611
1612
1612
- // There are cases where oldValue is null and newValue is string.Empty
1613
- // and vice versa, simply ignore when string.IsNullOrEmpty for both.
1614
- if ( string . IsNullOrEmpty ( oldValue ) && string . IsNullOrEmpty ( newValue ) )
1613
+ var timer = tooltipTimer ;
1614
+ if ( timer == null )
1615
1615
{
1616
+ OpenOrCloseToolTip ( newValue ) ;
1617
+
1616
1618
return ;
1617
1619
}
1618
1620
@@ -2056,14 +2058,18 @@ private void OnIsVisibleChanged(object sender, DependencyPropertyChangedEventArg
2056
2058
/// <param name="routedEventArgs">The <see cref="RoutedEventArgs"/> instance containing the event data.</param>
2057
2059
private void OnLoaded ( object sender , RoutedEventArgs routedEventArgs )
2058
2060
{
2059
- // TODO: Consider making the delay here configurable.
2060
- tooltipTimer = new DispatcherTimer (
2061
- TimeSpan . FromSeconds ( 0.5 ) ,
2062
- DispatcherPriority . Render ,
2063
- OnTooltipTimerTick ,
2064
- Dispatcher
2065
- ) ;
2066
- tooltipTimer . IsEnabled = false ;
2061
+ var initialShowDelay = ToolTipService . GetInitialShowDelay ( this ) ;
2062
+
2063
+ if ( initialShowDelay > 0 )
2064
+ {
2065
+ tooltipTimer = new DispatcherTimer (
2066
+ TimeSpan . FromMilliseconds ( initialShowDelay ) ,
2067
+ DispatcherPriority . Render ,
2068
+ OnTooltipTimerTick ,
2069
+ Dispatcher
2070
+ ) ;
2071
+ tooltipTimer . IsEnabled = false ;
2072
+ }
2067
2073
2068
2074
//Initial value for screen location
2069
2075
browserScreenLocation = GetBrowserScreenLocation ( ) ;
0 commit comments