I am writing a C # / XAML application for the Windows Store and would like to create and navigate to the page and fully display the page from C #. Is it possible? Obviously, I can inherit from the page, but when I try to go to a derived page that does not have XAML, I get a System.TypeLoadException ... "Could not find a Windows Runtime of type" Windows.Foundation ".
My thought was that this should be possible, since XAML is converted to a definition of a partial CLR class, so there is no reason that there was nothing in C #. But obviously, I missed some kind of structure requirement.
Suggestions?
Currently, all that I have for the derived page,
using Windows.UI.Xaml.Controls; namespace App1 { public class Page2 : Page { public Page2 () { } } }
And here is the complete exception:
Could not find Windows Runtime type 'Windows.Foundation'. at System.StubHelpers.WinRTTypeNameConverter.GetTypeFromWinRTTypeName(String typeName, Boolean& isPrimitive) at System.StubHelpers.SystemTypeMarshaler.ConvertToManaged(TypeNameNative* pNativeType, Type& managedType) at Windows.UI.Xaml.Controls.Frame.Navigate(Type sourcePageType) at App1.MainPage.<P2>d__2.MoveNext()
c # windows-store-apps windows-runtime xaml
cacti
source share