Open wisamasd opened 3 years ago
I can confirm this is still happening in 11.0.6. I can add two additional (related, I believe) symptoms. I used a Grid to contain the buttons in the StackPanel in my test.
If you move the mouse in from the side over the button with a ToolTip, past the Button, and stopping on the StackPanel (Grid in mine), no ToolTip at all is displayed.
Also, as you move around from the StackPanel (Grid in mine) to the Buttons, you can sometimes get two Tooltips displayed simultaneously. This starts by hovering over the background until the ToolTip shows, then moving over the Child control and getting its ToolTip up.
My similar XAML:
<Window xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
x:Class="AvaloniaToolTip.MainWindow"
Title="AvaloniaToolTip"
ToolTip.Tip="Window"
>
<DockPanel>
<StackPanel Orientation="Horizontal" Margin="0,5,0,0"
HorizontalAlignment="Right"
DockPanel.Dock="Bottom">
<StackPanel.Styles>
<Style Selector="Button">
<Setter Property="HorizontalAlignment" Value="Stretch" />
<Setter Property="VerticalAlignment" Value="Stretch" />
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="HorizontalContentAlignment" Value="Center" />
</Style>
</StackPanel.Styles>
<Grid ColumnDefinitions="*,*,*" RowDefinitions="*,*,*" Background="Yellow"
Name="MyGrid"
ToolTip.Tip="Grid"
>
<Button Content="Zero" Grid.Row="0" Grid.Column="0" ToolTip.Tip="Zero Button" />
<Button Content="Hello" Grid.Row="1" Grid.Column="1" ToolTip.Tip="Hello Button" />
<Button Content="Bye" Grid.Row="2" Grid.Column="2" ToolTip.Tip="Bye Button" />
</Grid>
</StackPanel>
</DockPanel>
</Window>
Should be fixed in 11.1 nightly builds.
If the cursor passes over the StackPanel, then after it is on the panel's object, it displays ToolTip of StackPanel, and only after moving to another object, show tooltip of object
https://user-images.githubusercontent.com/10140116/114829216-79ad6880-9dd3-11eb-9081-f2e9e16af392.mp4