Note that there are some explanatory texts on larger screens.

plurals
  1. POwindows phone, instantiate a page and show it
    primarykey
    data
    text
    <p>Is it possible to instantiate a <code>PhoneApplicationPage</code> from another project (in the same solution, but this shouldn't be important, should it?) and show it?</p> <p>Well, I know that it is possible to instantiate another page with:</p> <pre><code>MyPageInProjectB bPage= new MyPageInProjectB (); </code></pre> <p>but how do I show it?</p> <p>I want to do the following: I have two projects, and I want to show a page of one project within the other project and passing data between them. So I thought this would be perfect:</p> <pre><code>public partial class MyPageInProjectA : PhoneApplicationPage { private MyPageInProjectB bPage; public MyPageInProjectA() { InitializeComponent(); MyComplexObject objectIWantToPassToOtherPage = new MyComplexObject (); bPage= new MyPageInProjectB (objectIWantToPassToOtherPage); } private void ShowBPageButton_Click(object sender, EventArgs e) { // this is now what I want to do, but what doesn't work bPage.Show(); } } </code></pre> <p>Or is there another way to pass complex data between those pages?</p> <p>I don't want to use query strings, because it happens sometimes, that the (De-)Serializer has problems with <code>MyComplexObject</code>.</p> <p>I read how to navigate between both pages in this thread: <a href="https://stackoverflow.com/questions/16506731/how-to-redirect-to-a-page-which-exists-in-specif-project-to-another-page-in-othe">How to redirect to a page which exists in specif project to another page in other project in the same solution?</a> but I want to pass a complex object from one page to another. How can I do that?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload