Wrong position of Tooltip of WPF controls in Windows 10

Lili Chu 0 Reputation points
2023-04-07T02:18:18.8233333+00:00

I find the position of ToolTip on some WPF controls is not correct on some computers, all drift left(even after set the Placement to Right), so I create a WPF project(.net framework 4.6.1) to show this, simply has a TextBlock in MainWindow. Do you konw the reason of this strange act? How to correct it? Code:

<Window x:Class="NormalToolTipDemo.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        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"
        xmlns:local="clr-namespace:NormalToolTipDemo"
        mc:Ignorable="d"
        Title="MainWindow" Height="450" Width="800">
    <Grid>
        <StackPanel>            
            <TextBlock Text="TextBlock" ToolTip="TextBlock" ToolTipService.Placement="Right" Margin="20" HorizontalAlignment="Center"/>
        </StackPanel>
    </Grid>
</Window>

Normal image: User's image

Abnormal image: User's image

The related system configuration of abnormal tooltip: User's image

User's image

User's image

Developer technologies | Windows Presentation Foundation
Windows for business | Windows Client for IT Pros | User experience | Other
{count} votes

1 answer

Sort by: Most helpful
  1. Viorel 125.7K Reputation points
    2023-04-07T06:04:34.4666667+00:00

    Check if the behaviour depends on some settings in Control Panel or Registry: https://github.com/dotnet/wpf/issues/5944. The computer probably must be restarted.

    1 person found this answer helpful.
    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.