Could not find a point within its boundaries.... Please Help

Sep 27, 2010 at 3:41 AM

I have had this before, and have been doing just fine with the storyboard delay trick. Either something changed in the latest release, or my enviroment is now jacked up.

Here is a super basic solution:

Please help..


Sep 27, 2010 at 12:12 PM

I think this has to do with Landscape orientation. I noticed a similar issue with a landscape orientation project I have just over the weekend.

Long story, in the first CTP of WP7 tools, there was a bug in the VisualTreeHelper in landscape orientation. The HitTest would give you the wrong result, rotating the results by 90 degrees.

At the time I got around this by putting in a hack and rotating the point by 90 degrees to make up for it. To enable it, you do:

  PhysicsControllerMain.EnableWindowsPhoneLandscapeHack = true;

Anyway, I _thought_ that this WP7 bug was fixed in the Beta, but apparently it is back when the application is starting up, before the visual tree is rendered :( I am working on 2 games that are in portrait mode and "picking" at one in landscape so I didn't notice this right away.

I put the above line of code in your MainPage_Loaded event and that took care of it.

Note though that you have a couple of other issues - like your player Canvas is colored Black, so its boundary will be square, and your platforms are a bit off - the Rectangle is not lines up inside the Canvas properly.

Hope this helps. I'll try to get to the bottom of the orientation issue and VisualTreeHelper, but I'm guessing we will have to live with how it is at this point because it is part of WP7 RTW.

Sep 27, 2010 at 1:11 PM

Ok, this is a bummer. It looks like the original WP7 bug DID resurface in RTW :(

There is a post here -

I'll try to post anything I learn here as well.