Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to display EULA in WP7 application?

As stated by Microsoft, it's not possible to programatically navigate from the main page. I have a EULA page that I need to show if the user is using the app for the first time. My plan was to determine on the main page if the app has been used before. If not, I had planned to navigate to the EULA page, but this is not possible. How can I get around this navigation limitation?

like image 447
CACuzcatlan Avatar asked Dec 29 '22 09:12

CACuzcatlan


2 Answers

The issue with a dedicated EULA page that is automatically pushed on the back stack is that the application won't quit when the user presses the Back key when in the EULA page.

You should instead use a Popup control that you show and hide when appropriate.

See Peter Torr's post on how to exit an application for more details and background.

like image 148
Andréas Saudemont Avatar answered Dec 30 '22 22:12

Andréas Saudemont


It should be possible to navigate from the main page easily using:

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

Probably best to put this code in OnNavigatedTo of your main page or even later in the page cycle using Dispatcher.BeginInvoke(...). Putting it before that (i.e. in the constructor or Loaded) may not work.

like image 42
Technium Avatar answered Dec 30 '22 21:12

Technium