Setting Tooltip Timeout
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:
I was wondering if the option for how long the tooltip stays on screen is exposed somewhere in the Noesis Studio.
Code: Select all
ToolTipService.ShowDurationProperty.OverrideMetadata(typeof(DependencyObject), new FrameworkPropertyMetadata(Int32.MaxValue));-
-
sfernandez
Site Admin
- Posts: 3363
- Joined:
Re: Setting Tooltip Timeout
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:
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:
Code: Select all
<Border Background="White" ToolTipService.ShowDuration="8000" ToolTip="This is a ToolTip"/>Re: Setting Tooltip Timeout
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:
but instead use templates, do you have a suggestion where to place:
within a template like this one:
Thanks!
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:
Code: Select all
ToolTip="This is a ToolTip"Code: Select all
ToolTipService.ShowDuration="8000"Code: Select all
<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>-
-
sfernandez
Site Admin
- Posts: 3363
- Joined:
Re: Setting Tooltip Timeout
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:
And apply it to your control styles:
Could something like that work for you?
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:
Code: Select all
<Style x:Key="ControlBase" TargetType="Control">
<Setter Property="ToolTipService.ShowDuration" Value="10000"/>
...
</Style>Code: Select all
<Style TargetType="Button" BasedOn="{StaticResource ControlBase}">Re: Setting Tooltip Timeout
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!
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