@@ -1680,16 +1680,18 @@ private static void OnTooltipTextChanged(DependencyObject d, DependencyPropertyC
1680
1680
/// <param name="newValue">new value</param>
1681
1681
protected virtual void OnTooltipTextChanged ( string oldValue , string newValue )
1682
1682
{
1683
- var timer = tooltipTimer ;
1684
- if ( timer == null )
1683
+ // There are cases where oldValue is null and newValue is string.Empty
1684
+ // and vice versa, simply ignore when string.IsNullOrEmpty for both.
1685
+ if ( string . IsNullOrEmpty ( oldValue ) && string . IsNullOrEmpty ( newValue ) )
1685
1686
{
1686
1687
return ;
1687
1688
}
1688
1689
1689
- // There are cases where oldValue is null and newValue is string.Empty
1690
- // and vice versa, simply ignore when string.IsNullOrEmpty for both.
1691
- if ( string . IsNullOrEmpty ( oldValue ) && string . IsNullOrEmpty ( newValue ) )
1690
+ var timer = tooltipTimer ;
1691
+ if ( timer == null )
1692
1692
{
1693
+ OpenOrCloseToolTip ( newValue ) ;
1694
+
1693
1695
return ;
1694
1696
}
1695
1697
@@ -2151,14 +2153,18 @@ private void OnIsVisibleChanged(object sender, DependencyPropertyChangedEventArg
2151
2153
/// <param name="routedEventArgs">The <see cref="RoutedEventArgs"/> instance containing the event data.</param>
2152
2154
private void OnLoaded ( object sender , RoutedEventArgs routedEventArgs )
2153
2155
{
2154
- // TODO: Consider making the delay here configurable.
2155
- tooltipTimer = new DispatcherTimer (
2156
- TimeSpan . FromSeconds ( 0.5 ) ,
2157
- DispatcherPriority . Render ,
2158
- OnTooltipTimerTick ,
2159
- Dispatcher
2160
- ) ;
2161
- tooltipTimer . IsEnabled = false ;
2156
+ var initialShowDelay = ToolTipService . GetInitialShowDelay ( this ) ;
2157
+
2158
+ if ( initialShowDelay > 0 )
2159
+ {
2160
+ tooltipTimer = new DispatcherTimer (
2161
+ TimeSpan . FromMilliseconds ( initialShowDelay ) ,
2162
+ DispatcherPriority . Render ,
2163
+ OnTooltipTimerTick ,
2164
+ Dispatcher
2165
+ ) ;
2166
+ tooltipTimer . IsEnabled = false ;
2167
+ }
2162
2168
2163
2169
//Initial value for screen location
2164
2170
browserScreenLocation = GetBrowserScreenLocation ( ) ;
0 commit comments