I am trying to set the delay of a style for a tooltip. For that, I am using a dependency property.
This is style:
<Style TargetType="ToolTip" x:Key="ToolTipDefaultStyle">
<Setter Property="ToolTipService.ShowOnDisabled" Value="true"/>
<Setter Property="ToolTipService.InitialShowDelay" Value="{Binding PlacementTarget.(ap:ToolTipAttachedProperty.InitialShowDelay), RelativeSource={RelativeSource AncestorType=ToolTip}}"/>
<Setter Property="ToolTipService.ShowDuration" Value="{Binding PlacementTarget.(ap:ToolTipAttachedProperty.ShowDuration), RelativeSource={RelativeSource AncestorType=ToolTip}}"/>
<Setter Property="ContentTemplate">
<Setter.Value>
<DataTemplate>
<StackPanel>
<TextBlock Text="{Binding PlacementTarget.(ap:ToolTipAttachedProperty.Texto), RelativeSource={RelativeSource AncestorType=ToolTip}}" MaxWidth="400" TextWrapping='Wrap' />
</StackPanel>
</DataTemplate>
</Setter.Value>
</Setter>
</Style>
This is the view:
<StackPanel Name="spTiposIva" Orientation="Vertical" Margin="5,0,0,0"
ap:ToolTipAttachedProperty.Texto="{Binding TiposIvaTooltip}"
ap:ToolTipAttachedProperty.InitialShowDelay="10000"
ap:ToolTipAttachedProperty.ShowDuration="{StaticResource TooltipDisplayTime}">
<StackPanel.ToolTip>
<ToolTip Style="{StaticResource ToolTipDefaultStyle}"/>
</StackPanel.ToolTip>
</StackPanel>
The text is correctly shown, but the intial show delay is the default value, it doesn't delay 10 seconds.
How could I set the delay?
Thanks.