Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

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.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4617774
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T02:10:20+00:00 2026-05-22T02:10:20+00:00

It is not easy to explain the problem without an image and without code.

  • 0

It is not easy to explain the problem without an image and without code. For those interested, I have made a sample C#/WPF project that can be downloaded from http://rapidshare.com/files/461745095/02.WPFControlEvents.rar

It is a very small project (45KB). The problem is as follows (with my apologies for the contorted description):

A “fancy” (and rather ugly) button contains a stackpanel which in turn contains 1.) a label, 2.) a canvas, 3.) two (2) concentric ellipses, all laid out from left to right.

There is a MouseEnter and a MouseLeave event handler for the stackpanel which displays a message in the title bar indicating whether the mouse is over the stackpanel or outside of it.

The problem is: when the mouse is over the label (in turn contained in the stackpanel), the mouse is (correctly) reported as being over the stackpanel. When the mouse is moved over the canvas (which is also contained in the stackpanel), the mouse is (incorrectly?) reported as not being over the stackpanel, yet when the mouse is moved a little further to the right (over the two ellipses, which are on the canvas), the mouse is reported to be over the stackpanel again.

Why is it that when the mouse is over the canvas it is reported as not being over the stackpanel but when the mouse is over the ellipses (which are painted on the canvas) it is reported as being on the stackpanel ?.

thank you for shedding light into the problem,

John.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T02:10:20+00:00Added an answer on May 22, 2026 at 2:10 am

    Chances are you need to set the Background of the Canvas to Transparent. This will allow it to be “hit testable” and report mouse over events.

    More info can be found here, but Canvas has a null background by default.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

First thing i want to say that it's not an easy question to explain,
It's not easy to explain very well what I'm having problem with so I
I have a scenario which is not easy to explain, but I am sure
my problem is easy to explain with an example: I have a 'common' schema
Hi guys I have an easy question, but not easy to me. I have
I have to modify SQL Server reports. It is not easy to modify directly
Before answering, it is not as easy question as you might have thought about
As we all now, handling multibyte strings is not that easy in PHP. For
I have made a player that plays mp3 and does the job very well
My question is not easy to explain using words, fortunately it's not too difficult

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.