WPF 显示没有动画和透明度的工具提示

Ale*_*lex 2 wpf transparency tooltip

我想在没有任何透明度的情况下显示工具提示(也许是为了实现它 - 没有动画),并分别隐藏它。

我该怎么做?

mat*_*ieu 5

您可以覆盖资源:

<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" />
</Page>
Run Code Online (Sandbox Code Playgroud)

来自:http://social.msdn.microsoft.com/Forums/eu/wpf/thread/a279901c-175a-4a59-a602-5ecdc66d9015