[Unity] [Noesis 3.0] ToolTip is not shown when the cursor over an Item of ItemsControl
EDIT: Everything is working properly. It was my fault.
================================================
ToolTip works well for static UI elements but nothing happens when I'm trying to use ToolTip for items of any List control (ItemsControl, ListView, ListBox, etc).
In this case I declare ToolTip as part DataTemplate. Unfortunately it doesnt work at all. Before that, I tried using ToolTipService and defining ToolTip in Style of a item but the result is the same. Although ToolTip is shown to my surprise if items are declared right in xaml.
Another piece of cake: when I have the cursor over a fixed UI Element, and then I move the cursor to be over a dynamic item - ToolTip is shown for a second but immediately disappears after that. So, I think it's maybe somehow caused by incorrect mouse position for dynamic elements.
================================================
ToolTip works well for static UI elements but nothing happens when I'm trying to use ToolTip for items of any List control (ItemsControl, ListView, ListBox, etc).
Code: Select all
<Grid>
<StackPanel Orientation="Horizontal">
<TextBlock Text="SYSTEM"
ToolTip="SYSTEM" />
<ListBox ItemsSource="{Binding Items}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel Orientation="Horizontal" />
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<Grid Width="100"
Height="100"
Background="White">
<Grid.ToolTip>
<ToolTip>
<TextBlock Text="TEST" />
</ToolTip>
</Grid.ToolTip>
</Grid>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ListBox>
</StackPanel>
</Grid>
Another piece of cake: when I have the cursor over a fixed UI Element, and then I move the cursor to be over a dynamic item - ToolTip is shown for a second but immediately disappears after that. So, I think it's maybe somehow caused by incorrect mouse position for dynamic elements.
Last edited by cjmx on 22 Jun 2020, 20:57, edited 1 time in total.
Re: [Unity] [Noesis 3.0] ToolTip is not shown when the cursor over an Item of ItemsControl
Never mind. My fault. Source collection of items was recreated every frame not every click as I planned. I fixed it. So, now everything is working without any issues.
Re: [Unity] [Noesis 3.0] ToolTip is not shown when the cursor over an Item of ItemsControl
Great! Thank you for the feedback
Who is online
Users browsing this forum: Ahrefs [Bot], Google [Bot] and 97 guests