Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I detect if app is running in Kid's Zone?

I am trying to figure out if it is possible to detect if the app is running in the Kids Zone of Windows Phone 8.

I am having a dialog popup when trying to create a secondary tile that says "When you're in Kid's corner, you can't change what's pinned to start." I want to disable this menu item if it is in the Kid's Zone so this isn't experienced by any children using my app.


Resolved:

The ApplicationProfile.Modes property in Windows.Phone.ApplicationModel namespace returns a ApplicationProfileModes object. I used the code below and had the dialog popup and say "Default" in the normal screen and "Alternate" in kids mode.

protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e)
{
    base.OnNavigatedTo(e);
    MessageBox.Show(messageBoxText: ApplicationProfile.Modes.ToString());
}

Thank you matthijs Hoekstra for your correct answer.

like image 824
Adam Benoit Avatar asked Dec 06 '25 04:12

Adam Benoit


1 Answers

You can check http://msdn.microsoft.com/en-us/library/windowsphone/develop/windows.phone.applicationmodel.applicationprofile.modes(v=vs.105).aspx

Windows.Phone.ApplicationModel.ApplicationProfile namespace

like image 118
matthijs Hoekstra Avatar answered Dec 07 '25 18:12

matthijs Hoekstra



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!