0

I'm struggling with a UWP application which I did not originally create, but I don't have access to any of the original developers to help me, and I am not an expert in UWP development.

The application uses a Frame, Windows.UI.Xaml.Controls.Frame, for navigation. During the ordinary course of events I can switch from one page to another without issue. I can observe that the "OnNavigatedTo(NavigationEventArgs e)" function of the page gets called, and that e.Parameter is null.

At one specific place, the application does use the parameter to open a particular page. This works: the page receives the parameter as e.Parameter and uses it as expected.

The problem is, from that point forward, whenever this page is switched to again, for example by using Frame.Navigate(typeOf(MyPage)), it receives the same parameter again, even though it was not passed again. I cannot figure out how this is happening, or where it is coming from, or being stored. There must be some way to clear the parameter, but I can't figure out what it is.

Can someone explain how this is supposed to work? Thanks.

2
  • It is hard to locate where the issue is just based on the description. Have you check if you are calling Frame.GoBack somewhere in your app? The GoBack method will call the navigate method with the parameter which you used to use. I'd suggest you reproduce this hehavior in a blank project which will help to troubleshooting the issue Commented Feb 16, 2024 at 6:31
  • Have you found out the issue? Commented Feb 22, 2024 at 1:50

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.