User avatar
stonstad
Topic Author
Posts: 133
Joined: 06 Jun 2016, 18:14
Location: Lesser Magellanic Cloud
Contact:

Tooltip Bug?

11 Oct 2019, 16:33

I notice that my tooltips are affected by the scale transform of the object they are attached to. From this post on StackOverflow (https://stackoverflow.com/questions/380 ... t-modified), it sounds like the native WPF behavior of tooltips is that they maintain a separate visual tree and are not affected by the scale of their associated framework element,

Here is an example screenshot of my tooltips being affected by scale, when I am not sure they should be. The behavior occurs with either layout and render transforms are applied to the object the tooltip is associated with. In the screenshot shown below, the object they are attached to has a scaling factor of 0.5f via ScaleTransform applied to a LayoutTransform.

Image

Is this a bug that I should file a report for?
 
User avatar
sfernandez
Site Admin
Posts: 1915
Joined: 22 Dec 2011, 19:20

Re: Tooltip Bug?

14 Oct 2019, 10:35

Yes, this is a bug, I just verified that in WPF the ToolTip is not scaled as its owner, it remains with the default size.
Could you please report it in our bugtracker?

As a temporal workaround you can scale up the ToolTip:
<Button Content="Hello World!">
    <Button.LayoutTransform>
        <ScaleTransform ScaleX="0.5" ScaleY="0.5"/>
    </Button.LayoutTransform>
    <Button.ToolTip>
        <ToolTip>
            <ToolTip.LayoutTransform>
                <ScaleTransform ScaleX="2" ScaleY="2"/>
            </ToolTip.LayoutTransform>
            <TextBlock Text="Hello World!"/>
        </ToolTip>
    </Button.ToolTip>
</Button>

Who is online

Users browsing this forum: No registered users and 0 guests