i’m trying to navigate from a xaml BlankPage (Page) to xaml GamePage (SwapChainBackgroundPanel)
i change OnLaunched event to go directly on BlankPage
RootFrame = new Frame();
RootFrame.Navigate(typeof(BlankPage));
Window.Current.Content = RootFrame;
Window.Current.Activate();
BlankPage contain a button’s event to create and launch GamePage
var app = App.Current as App;
if (app.GamePage == null)
app.GamePage = new GamePage(string.Empty);
Window.Current.Content = app.GamePage;
then when it try to create the game
public GamePage(string launchArguments)
{
_game = XamlGame<Game1>.Create(launchArguments, Window.Current.CoreWindow, this); // error
}
i got this error
An exception of type ‘SharpDX.SharpDXException’ occurred in SharpDX.DLL but was not handled in user code
Additional information: HRESULT: [0x80070057], Module: [General], ApiCode: [E_INVALIDARG/Invalid Arguments], Message: The parameter is incorrect.
i tried the same strategy on a Windows Store Project and there everything works.
What am I doing wrong?
MonoGame 3.4
MonoGame Windows Phone 8.1 Project