2013-02-07 62 views
0

我有一個WPF應用程序,並且我想在按鈕單擊時創建新的Win32窗口(導致它用C++編寫的窗口)。 而且,我有一個問題。如果我將光標導航到按鈕,則會顯示工具提示。 然後,點擊按鈕後,工具提示沒有時間消失。創建Win32窗口而不會阻止當前的UI

我該如何預防這種情況? 感謝

回答

0

如果有提示dissapearing您可以覆蓋工具提示的父資源禁用動畫,就像這樣:

<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" />