relacad
Topic Author
Posts: 14
Joined: 28 May 2025, 18:22

Setting Tooltip Timeout

25 Jun 2025, 20:44

Hey folks. I'm trying to define how long my tooltips remain on screen, both globally as well as unique timers for unique tooltips as they seem to timeout at 5 seconds after they're displayed. I know there is a tooltip timeout function you can define in standard wpf that displays tooltips until you exit the hover:
ToolTipService.ShowDurationProperty.OverrideMetadata(typeof(DependencyObject), new FrameworkPropertyMetadata(Int32.MaxValue));
I was wondering if the option for how long the tooltip stays on screen is exposed somewhere in the Noesis Studio.
 
User avatar
sfernandez
Site Admin
Posts: 3363
Joined: 22 Dec 2011, 19:20

Re: Setting Tooltip Timeout

03 Jul 2025, 11:33

Hi,

The ToolTipService attached properties are not properly exposed in Studio, could you please create a ticket about it in our bugtracker?

Those properties are already implemented, so if you include any of them in the XAML they will work as expected:
<Border Background="White" ToolTipService.ShowDuration="8000" ToolTip="This is a ToolTip"/>
 
relacad
Topic Author
Posts: 14
Joined: 28 May 2025, 18:22

Re: Setting Tooltip Timeout

04 Jul 2025, 18:42

Thanks Sfernandez,

I created a ticket here: https://www.noesisengine.com/bugs/view.php?id=4285

Also, I'm excited to test out the fix, I have some custom tooltip templates that take more than 5 seconds to read! For custom tooltips that aren't using the:
ToolTip="This is a ToolTip"
but instead use templates, do you have a suggestion where to place:
ToolTipService.ShowDuration="8000"
within a template like this one:
<ControlTemplate x:Key="ToolTipTemplatePanel.001" TargetType="ToolTip" >
        <Grid>
          <Border x:Name="OuterBorder" RenderTransformOrigin="0.5,0.5" BorderThickness="4,4,4,4" CornerRadius="10,10,10,10" Style="{DynamicResource BorderOutlineStyle.001}" BorderBrush="#FFAE77F3"/>
          <Border x:Name="InnerBorderBackground" BorderThickness="4,4,4,4" CornerRadius="10,10,10,10" Style="{DynamicResource ToolTipInsidePanelBackground.001}" RenderTransformOrigin="0.5,0.5" Grid.ColumnSpan="3" Grid.RowSpan="3" Opacity="0.99" Background="#FF191919"/>
          <Grid Margin="20,20,20,20">
            <Grid.RowDefinitions>
              <RowDefinition Height="1*"/>
              <RowDefinition Height="14*"/>
              <RowDefinition Height="1*"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="1*"/>
              <ColumnDefinition Width="14*"/>
              <ColumnDefinition Width="1*"/>
            </Grid.ColumnDefinitions>
            <ContentPresenter ContentSource="Content" Grid.Column="1" DataContext="xyz" Grid.Row="1" ContentTemplate="{DynamicResource TooltipContentPresenter.Basic}"/>
          </Grid>
        </Grid>
      </ControlTemplate>
Thanks!
 
User avatar
sfernandez
Site Admin
Posts: 3363
Joined: 22 Dec 2011, 19:20

Re: Setting Tooltip Timeout

09 Jul 2025, 11:13

Thanks for the report. While this issue is fixed you can write the tooltip duration directly in xaml to try it.

The ToolTip template just defines how the tooltip looks, if you want to define several properties for your control tooltips I suggest you create a Style:
<Style x:Key="ControlBase" TargetType="Control">
  <Setter Property="ToolTipService.ShowDuration" Value="10000"/>
  ...
</Style>
And apply it to your control styles:
<Style TargetType="Button" BasedOn="{StaticResource ControlBase}">
Could something like that work for you?
 
relacad
Topic Author
Posts: 14
Joined: 28 May 2025, 18:22

Re: Setting Tooltip Timeout

10 Jul 2025, 21:51

Hey Sfernandez,

Typing in the .xaml directly on the parent item of the tooltip worked great! Only tweak I had to do was change it to a general style from a control style, as some of the tooltips were attached to content presenters inside ItemContainers to access their .content to display contextual tooltips from within a Listbox.

Thanks again!

Who is online

Users browsing this forum: No registered users and 3 guests