The problem occurs when dynamically loading the XAP when I have the following XAML tag:
<local:myGame x:Name="GameControl" Width="1366" Height="768"/>
This is the portion of code that throws the exception
page = asm.CreateInstance(filePage) as
In the Details of the exception a portion states:
Message=System.ArgumentNullException: Value cannot be null.
I'm guessing that this may be the same reason that Visual Studio says "Cannot create instance of "myGame" in the xaml editor.
I'm not that concerned about Visual Studio not displaying the control, but I really need to be able to dynamically load the XAP file. The game works fine if run on its own, it just doesn't like to be dynamically added to another page.
Is there anything I can do to get around this?