Hi,
I have an app that has a search box on the screen, there is a gallery that reacts to the words that are entered into the search box. When the screen loads I reset the search box so it hides the gallery and the user has a clean interface to search from. The items in the gallery have a button that navigates to another screen, this new screen uses the selected item from the search screen to display data. All straightforward so far.
Now the complicated bit, I want to change the on visible of the search screen to react differently depending where the user has navigated from. By this I mean if the user clicks a button from a different page within the app to go to the search page it will load and reset the search box so that the interface is clean. However if the user has performed their search and clicked on an item and presses a "Back" button it should return them to the search screen but this time it doesn't execute the reset on the search box so their previous search results are still visible.
I've been playing with UpdateContext but this doesn't appear to work across screens, or at least I can't get it to work across screens.
Any help or thoughts gratefully received.
Rob
@RandyHayes ah, lightbulb moment - thanks that really helped point me in the right direction
You can actually utilize the context variable for this. If your search screen uses a context variable such as lclResetScreen to determine if the screen should be reset, then you can pass this back from another screen. You can't use the Back() function on your other screens, but you can use the Navigate to do so.
Ex. Navigate(yourSearchScreen, None, {lclResetScreen:false})
This will set the context variable on the search screen to false.
Perhaps you can work this into your thought process.
I hope this is helpful for you.
WarrenBelz
110
Most Valuable Professional
MS.Ragavendar
77
stampcoin
52