Tony Raymond
Tony Raymond

Reputation: 187

Windows Phone 8 MonoGame Initialize not being called

I'm trying to create a WP8 game using MonoGame 3.2 in VS2013. I've made XNA games for WP7 in the past and am perplexed as to why this is happening.

I've got the unmodified WindowsPhone8 monogame template pulled up and am able to compile and deploy but the emulator just shows black (not cornflower blue). I've stepped thru the code and see that the Game1 class constructor is being executed. At this point I would expect Initialize, LoadContent, Update, Draw to be executed... but nothing. Just the constructor.

Am I missing a step? Not sure where to start looking if its a config problem.

Thanks!

Upvotes: 2

Views: 342

Answers (2)

Jawahar
Jawahar

Reputation: 4885

In the GamePage.xaml, replace the Grid with DrawingSurfaceBackgroundGrid. it should work.

  <DrawingSurfaceBackgroundGrid x:Name="LayoutRoot" Background="Transparent">

        <MediaElement></MediaElement>

  </DrawingSurfaceBackgroundGrid>

Upvotes: 1

Tony Raymond
Tony Raymond

Reputation: 187

Ok... So to fix this you need to install the latest SharpDX (2.5 at the time of writing). Then add a reference to the SharpDX.dll for the correct platform(x86/arm) in your project. And boom! it works.

Upvotes: 2

Related Questions