Click here to Skip to main content
15,915,164 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello,
i am working on wpf application. I have done customized tool tips for my application. Right now when I place my cursor on any button or text box I am displaying a tooltip at some fixed location in my window... Now I wan to place a tool tip when my cursor is placed any where in the window.. So that my user gets the info about functionality of that window by seeing description in tool tip... Can any one sugest me how to place a tool tip when my cursor is placed inside the window screen in wpf
Posted

1 solution

How have you implemented your custom tool tips?

WPF standard behaviour for tooltips, even customized ones, is that it appears next to the cursor, as in this example;
XML
<Window x:Class="WpfApplication4.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="MainWindow" Height="350" Width="525">
    <StackPanel>
        <Button Content="A" ToolTip="Simple"></Button>
        <Button Content="B">
            <Button.ToolTip>
                <Grid Width="100" Height="100" Background="DeepPink">
                    <Label Content="I am not simple"/>
                </Grid>
            </Button.ToolTip>
        </Button>
    </StackPanel>
</Window>


Unless your tooltips require some very special treatment, you should be able to do customized versions using that type of construct.

Hope this helps,
Fredrik
 
Share this answer
 
Comments
jing567 3-Feb-14 3:16am    
Hi Fedrik,
I customized the tool tips.... But now I want to place a tool tip when my mouse comes inside a screen.... Then that tool tip should be visible.... Above code u have mentioned for placing a tool tip for button.... i want a tool tip for window area.... Thanks for responding to my question :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900