Create Win32 Window without blocking the current UI

删除回忆录丶 提交于 2019-12-10 12:29:16

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!