简体   繁体   中英

Passing large amount of data between pages wont load the page in wp7

I'm trying to pass some text between pages to a textblock. It works fine with small amount of data, but with large amount of data the page won't load.

Page 1:

NavigationService.Navigate(new Uri("/Pages/DetailPage.xaml?gameGuide=" + gameGuide, UriKind.Relative));

Page 2:

if (NavigationContext.QueryString.TryGetValue("gameGuide", out gameGuide))
    guideTxtBlk.Text = gameGuide;

The data source is from a XML file which I'm downloading to Page 1.

Here is the amount of data that work:

In the level "Project Nova", after you fight the British and escape, you must set an explosive. Make sure you clear out all the enemies before planting it. There should be a Mosin–Nagant gun after killing the enemies in the first room. This should help you clear out the enemies in the second room, especially the enemies on the higher walkways. You can shoot through the metal gratings. After setting the explosive, shoot the highlighted beam and make your way out. As you head out, there will be an enemy outside the door on your right and another coming on your left. Kill these two and then sprint down the walkway. There will be a few more enemies climbing onto the ship but you should have no issues killing them and proceeding. A last enemy should be up high so be forewarned. If you die at any time during this run, you may still have enough time to make it, as long as there is 2:15 left on the timer.

Here is the one that don't work:

This is easiest to do on Recruit difficulty and is done on the level "WMD". You will be in control of the dispatcher in the SR71 plane and a soldier on the ground, switching between them from time to time. To zoom in you press (LT) and to zoom out you press (RT). To command your squad on where to go, press (A) on the location. Use (LS) to move the cursor around the area. After you find the squad on your screen, you will be given an insertion point that is to the east of you labeled "1602". After you hear that vehicles are coming in from the north, you will be told to put your team into the building labeled "Safe House". Select the Safe House with (A). You will be put into the soldier's scenario to kill the enemies entering the house. After the encounter with the enemies that entered the building, you will be put back into the hands of the dispatcher. Make sure all 4 of your teammates are alive on the screen. After this, select the back of the Safe House building. To the right you will see two enemies next to a barrel. Scroll over these enemies and select them with (A) to have your team attack them. Directly behind them is an objective point. Select the objective point so that your team moves to this location. After that, you will be given another insertion point just below this one. You will see bushes halfway between your current location and the objective point. Select the bushes with (A) to have your team move there (you should be 500-600 away from the insertion point). Immediately after they have moved, your dispatch will tell you that a large group of enemies is coming around. You will be told to hold down (RS) to make your team go into a prone position and not be seen by the enemies. After you get the all clear, move your team to the objective directly in front of them and you will be given an objective labeled "Barracks". The on screen reticule should turn red, so select the Barracks with (A) to have them move into position. Now you will be put back into the view of the soldier. Eliminate all the enemies found inside of the building and be sure to be in front to take as much of the fire that is shot at you and your teammates. At the end of all this, you should have all four of your teammates with you. You need to clear the last room, plant and detonate the C4 and make it through the barracks. You will be given a new insertion point once you leave the barracks, so guide your team there. When you have reached the second insertion point outside of the building, you have safely guided the squad without killing them. Make sure that while you are controlling your team, no vehicles that drive by see you as your team on the ground will be eliminated immediately. If they are eliminated, you will need to restart the whole mission over.

There is a maximum length for a URI. I think it is somewhere around 2000 characters. You should probably adopt a different method to pass the data between the pages. Use a global variable, put the data in the ViewModel, or save and retrieve from PhoneApplicationService/IsolatedStorage are some options.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM