I have an app that I’m upgrading from some beta bits – and my map screen is crashing. So to try to get to the bottom of it – I started a brand new – blank “Win Phone Application”.
Referenced Caliburn.Micro (just built from new code last night) Version: caliburnmicro_1296ea635677 (from codeplex)
referenced Microsoft.phone.controls.map.dll
and in the MainPage I added
<Grid>
<Maps:Map />
</Grid>
and I add a bootstrapper to app.xaml
<WP7:PhoneBootStrapper x:Name="bootstrapper" />
when the page runs in the phone emulator – the main page renders and I see a map of the world. if I click anywhere on the page – I get an unhandled exception of “The parameter is incorrect”
if I remove the
from the app.xaml – the map works correctly.
What do you think?
Thanks for any advice?
I have found the answer.
The key here – is that I had this setup and wroking with the Beta Templates – and it stopped working when I moved to the WinPhone RTM Templates in VS2010.
Caliburn does some work on my behalf, that was “ADDED” to the RTM templates – which were conflicting with each other. In the end This problem has/had nothing to do with the Bing Maps control – it just so happens that – that was my first screen – so that’s where I was trying to solve the problem.
This was the ever so Not-Helpful exception:
Which, I’m pretty sure would happen on any screen – if you went to the upgrade path of templates, like I did. So here is what I had to remove – to get everything back to normal. In the new App.Xaml.cs – I removed (by commenting) in the App Ctor …
And then I removed these method bodies, because it’s just dead code after removing the InitializePhoneApplication() call from ctor …
Special Thanks to Rob for his help solving this mystery!