×

Discussion Board

Results 1 to 9 of 9
  1. #1
    Nokia Developer Champion
    Join Date
    Dec 2008
    Posts
    2,349

    Data transfer in page navigation

    Hi,
    I have just started WP7. And trying to create some sample app. As I am very poor in C# so finding difficult to understand the examples.

    1. I am trying to parse XML and display the content in list box
    2. when i click on any of the list item I should see its detail in a new page.


    I could do the first part , but not able to do the second one.
    I can generate the client event but not able to pass the data to the second page to display.


    Could you put some light on this please.

  2. #2
    Nokia Developer Champion
    Join Date
    Dec 2008
    Posts
    2,349

    Re: Data transfer in page navigation

    I have checked and found that when I am assigning value to the {get; set;} property fro another class, its not assigning any value and thus i am getting an null exception.
    Could any one please show me how can I assign value from one class to another using get, set property

  3. #3
    Nokia Developer Champion
    Join Date
    Dec 2008
    Posts
    2,349

    Re: Data transfer in page navigation

    actually in one word, i am trying to get the values of the selected item in the listbox and display those values into an another page.
    Please suggest how can i proceed.

  4. #4
    Nokia Developer Expert
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,142

    Re: Data transfer in page navigation

    you could check chapter 6 from: http://www.microsoft.com/download/en....aspx?id=24519 basically you could store the data in application class and access it anywhere.. Basically the application class is accessible by any place of the application, similarly as the AppUI is with Symbian applications.

  5. #5
    Nokia Developer Champion
    Join Date
    Dec 2008
    Posts
    2,349

    Re: Data transfer in page navigation

    Quote Originally Posted by symbianyucca View Post
    you could check chapter 6 from: http://www.microsoft.com/download/en....aspx?id=24519 basically you could store the data in application class and access it anywhere.. Basically the application class is accessible by any place of the application, similarly as the AppUI is with Symbian applications.
    Thank you Yucca, I got your point, and I must appreciate the way to explained me the application class comparing with the Symbian, so can I treat the Application class of WP7 as that of the Symbian Appui.cpp, I mean can I add code there and use it as a controller class, as I do I symbian?

    As you know I am new to C# so I need to make the basic. But going through the whole C# language will take lot of time, so if you could share any link, tutorial, or articles that are needed for WP7, would be a great help for me.
    Last edited by somnathbanik; 2011-09-15 at 07:13. Reason: added

  6. #6
    Nokia Developer Expert
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,142

    Re: Data transfer in page navigation

    I would consider myself a novice on WP programming as well as C#, anyway best way to learn is to actually do programming.. Would not know best examples, would simply suggest searching for specific problems, and once you find any sites that you find usefull, then bookmark them..

    For the controller question, according to my current knowledge (as limited as it is), the application class could indeed be used pretty much as AppUi class in this case.

  7. #7
    Registered User
    Join Date
    Mar 2006
    Location
    India
    Posts
    503

    Re: Data transfer in page navigation

    Hi,
    As u have a list:
    then u could
    1: capture the tap event and get the selected index:
    example:
    private void ListBox_Tap(object sender, System.Windows.Input.GestureEventArgs e)
    {
    int selectedIndex = Storelistbox.SelectedIndex;

    //the accordin to the selevcted index u could navigate to thjat respective xaml view.
    // using pass on the message.
    NavigationService.Navigate(new Uri( string.Format("/SecondPage.xaml?val={0}", ValueTextBox.Text), UriKind.Relative));

    //similarly for going back u can use
    NavigationService.GoBack();

    }
    Check the msdn doc:
    http://create.msdn.com/en-us/education/documentation

    Hope this helps
    Regards
    Kamal :)
    ------------------
    You never expect what expects you.

  8. #8
    Registered User
    Join Date
    Oct 2011
    Posts
    2

    Re: Data transfer in page navigation

    As Kamal has mentioned you can use the Navigation URI. Basically just think of it like any normal URL with a QueryString. If you have a larger set of data, then use the IsolatedStorage to store it and then retrieve it once you've navigated to the next page.

  9. #9
    Registered User
    Join Date
    Jan 2012
    Location
    Kochin
    Posts
    10

    Re: Data transfer in page navigation

    Normally u can do this in multiple way
    1) Passing as in URI
    2) Set data to Controller class(just model class for data share b/w pages)

    Create a class and name it as Controller.cs and a Property Keyword. Please make sure class should be SingleTone(Create static Property of same instance).
    Just assign listbox selected item to Controller class keyword prop and access to anywhere.
    Thanks

Similar Threads

  1. How to transfer a saved web page in N85 to PC
    By shailendra_eac in forum Mobile Web Site Development
    Replies: 0
    Last Post: 2010-08-23, 06:30
  2. Page Navigation in MVC pattern
    By hojatvaheb in forum Symbian C++
    Replies: 8
    Last Post: 2007-10-23, 16:39
  3. Nokia 6230: data storage and data transfer
    By ripiajo in forum Mobile Java General
    Replies: 0
    Last Post: 2005-02-19, 12:21
  4. accessing specific data(information page -Engineering Option Data-)
    By mahd_98 in forum Mobile Java Tools & SDKs
    Replies: 1
    Last Post: 1970-01-01, 02:00

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •