Search code examples
wpftooltiptransparency

WPF Show ToolTip without animation and transparency


I wanna show ToolTip without any transparency (maybe to accomplish it - without animation), and hide it respectively.

How can I do it?


Solution

  • You can override the Resource :

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

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