在不阻塞当前 UI 的情况下创建 Win32 窗口 [英] Create Win32 Window without blocking the current UI
本文介绍了在不阻塞当前 UI 的情况下创建 Win32 窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个 WPF 应用程序,我想在单击按钮时创建新的 Win32 窗口(因为它是用 C++ 编写的窗口).而且,我有问题.如果我将光标导航到按钮,则会显示工具提示.而且,点击按钮后,工具提示没有时间消失.
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
推荐答案
如果工具提示消失,您可以覆盖工具提示的父资源以禁用动画,如下所示:
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" />
这篇关于在不阻塞当前 UI 的情况下创建 Win32 窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文