tags:

views:

68

answers:

2

Hi,

I need to create a WPF application , which contains two windows.. the window1 contains a button. i need to show the second window when the cursor is over the button in first window [ Like tooltip ] . if the mouse leaves, the second window should close..

I'm new to WPF. can any one help me with a sample code

+1  A: 

If it is possible to do without your second window something like this is usually done in a tooltip, which has exactly that behaviour. (e.g. http://www.c-sharpcorner.com/UploadFile/mahesh/FancyWPFTooltip07132008214937PM/FancyWPFTooltip.aspx)

MrDosu
Can we do the same in `Winforms`
Pramodh
In Winforms it is a little harder to make a customized ToolTip that will not just display text. You can pass in an IContainer to handle those scenarios. But I'm not firm in forms anymore :/. http://msdn.microsoft.com/en-us/library/ecft989x.aspx
MrDosu
+1  A: 

Check out System.Windows.Controls.Primitives.Popup. It is maybe what you are seeking.

Holstebroe