How to display EULA in WP7 app?

As indicated by Microsoft , it is not possible to programmatically go from the home page. I have an EULA page that I should show if the user is using the application for the first time. My plan was to determine on the main page if the application was used before. If not, I planned to go to the EULA page, but this is not possible. How can I get around this navigation restriction?

+4
source share
3 answers

You can easily navigate from the main page using:

if (!eulaAgreed) NavigationService.Navigate(new Uri("/EULAPage.xaml", UriKind.Relative)); 

It is probably best to put this code in the OnNavigatedTo of your main page or even later in the page loop using Dispatcher.BeginInvoke(...) . The room before that (i.e. In the constructor or Loaded) may not work.

+3
source

The problem with the special EULA page, which is automatically pushed onto the back stack, is that the application will not exit when the user presses the back key, when on the EULA page.

Instead, you should use Popup , which you show and hide when necessary.

For more information, see Peter Torr's post on how to exit the application for more details and background.

+6
source

What do you think happens with the navigation stack? Can users access the EULA page again? perhaps by clicking back with MainPage?

+1
source

Source: https://habr.com/ru/post/1316453/


All Articles