On my ListBoxItem MouseEnter event I am creating a new window with the following code.
Window w = new Window(); w.Show();
When the mouse leaves the current item I want to close the window.
How do I do that?
Many Thanks.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Store a reference to the window (
win your case) in a place where both the event handler for MouseEnter and MouseExit can access it and then just do aw.Close().