Frame.Navigate from a Page in a C# assembly to a Page defined in a C++ library (or: DirectX/XAML interop in a polyglot solution) RRS feed

  • Question

  • I have a problem similar to this user, who asked how to Frame.Navigate from a Page in one assembly to another:


    The difference in my case is I'm trying to Frame.Navigate to a page defined in a C++ project (another Windows Runtime Component project, just in C++). The code compiles and runs, but when Frame.Navigate(typeof(MyPageInNativeAssembly), param) is called, I just get a blank, full-screen page (if it's a page). The constructor of MyPageInNativeAssembly is never hit.

    The reason I'm trying to do this is that I'd like to define most of my Pages in C#, but I have one particular page that I need to incorporate DirectX into. Following the "Magazine" MSDN example, I'm attempting to do so with a VirtualSurfaceImageSource class defined in native code. Somehow, I need to get that ImageSource across the interop boundary to bind to an Image UIElement or else define the page in the native project, which is the approach I'm currently attempting.

    Any thoughts on how to accomplish this?

    Saturday, December 1, 2012 8:50 PM