问题
I have an WPF application, and I want to create new Win32 window (cause it's window written in C++) on button click. And, I have a problem. If I navigate the cursor to the button, there is the tooltip is shown. And, after clicking on the button, tooltip has no time to dissapear.
How can I prevent this situation? Thanks
回答1:
In case with tooltips' dissapearing you can override the tooltip's parent resource to disable animation , like this:
<Page
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
>
<Page.Resources>
<PopupAnimation x:Key="{x:Static SystemParameters.ToolTipPopupAnimationKey}">None</PopupAnimation>
</Page.Resources>
<Button ToolTip="My ToolTip Content" Content="My Button Content" />
来源:https://stackoverflow.com/questions/14748255/create-win32-window-without-blocking-the-current-ui