Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4346994
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T12:14:51+00:00 2026-05-21T12:14:51+00:00

Well, after one week of watching and reading tutorials I still couldn’t manage to

  • 0

Well, after one week of watching and reading tutorials I still couldn’t manage to pass xml data between pages. I had zero knowledge of c# at the beginning, i can understand a bit more know.

I would appreciate if you could guide me or at least tell me where to start. Ok, here is What I want to do and I couldn’t

For example; I have an xml data like this;

<document>
    <car id="01">
        <manufacturer>Ford</manufacturer>
        <model>Mustang</model>
        <year>1965</year>
        <details>The Ford Mustang of 1965 was first unveiled bla bla for example....</details>
    </car>
    <car id="02">
        <manufacturer>Chevrolet</manufacturer>
        <model>Nova</model>
        <year>1967</year>
        <details>The Chevrolet Nova of 1967 was bla bla for example....</details>
    </car>
    <car id="03">.....
</document>

I want to show manufacturer and model inside the listbox the mainpage.xaml (It works ok)

TextBlock Text="{Binding manufacturer}"
TextBlock Text="{Binding model}"

When clicked on the model name i want to show year and details of the model in another page (details.xaml for example)

I was able to pass simple text with the method below but I couldn’t pass bindings and It didnt work for me. It just list details and year for all the cars not the specific one that i choose in the mainpage.

this.NavigationService.Navigate(
new Uri("/details.xaml?......

Thank you in advance. Sorry if I bothered you.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T12:14:51+00:00Added an answer on May 21, 2026 at 12:14 pm

    Instead of passing a long string of XML data between pages I’d just pass the car’s ID. Since you’re data binding to the ListBox on mainpage.xaml I’m assuming you have a class similar to the following:

    public Class Car {
      public string manufacturer;
      public string model;
      public unsigned int id;
    
      // ...
    }
    

    Read the XML file on startup and create an ObservableCollection of Car objects which is bound to the ListBox. Then, in the Tap gesture handler for the ListBoxItem do the following:

    private void OnListBoxItemTapped( object sender, GestureEventArgs e )
    {
      var car = sender.DataContext as Car;
    
      if( car != null ) {
        // Navigate to page that will display the car details
        NavigationService.Navigate(
              new Uri( String.Format( "/detailspage.xaml?id={0}",
                Uri.EscapeDataString( car.id ) ), UriKind.Relative ) );
      }
    }
    

    Then, in the details page OnNavigatedTo method, simply find the correct car using the id and bind that object to the page’s DataContext.

    Note that EscapeDataString is not necessary if your IDs are always numeric. If you really want to pass all the XML data as is, you can do that as well by replacing the ID with the XML string data.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Well this question came after this one The reasons are pretty much the same,
Well, after a one hour introduction to javascript, I ve come up with the
Well after a while of scratching my head and going huh? trying to figure
Well looks too simple a question to be asked but i asked after going
Well how could I change the before image to the after image by using
After much searching and googling I am coming back to the well. I have
I've got an after insert trigger that works well. However, I want it to
Tomcat has got that well-known memory leak problem that causes PermGen space errors after
here's a Fusion Tables map that's broken after a search. It does everything well
I am using AVPlayer it is working perfectly on device as well, but after

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.