共用方式為


Detecting when your app is running in Kid's Corner mode (XAML)

Kid’s Corner is a Windows Phone that allows the user to put their phone in a special mode for kids, in which only the apps and media they specify can be accessed. An app can detect at run time if it is running in Kid’s Corner mode and modify its behavior and UI to be appropriate for a child user. Adding Kid’s Corner-specific functionality to your app is optional, and the behavior changes you implement is entirely up to you. Some features that you should consider disabling when running in Kid’s Corner include in-app purchases, launching the web browser, setting the lock screen, and the ad control.

To view or download a sample project that illustrates how to use this feature, see Kid’s Corner Sample.

Detecting when your app is running in Kid's Corner mode

To determine if your app is currently running in Kid’s Corner mode, simply check the ApplicationProfileModes property. If the value of the property is Alternate, then your app is currently running in Kid’s Corner mode. Typically, an app will check this property when the app is launched.

Testing your app in Kid's Corner mode

To test your app in Kid's Corner mode

  1. On the device or emulator, go to Settings, and then select Kid’s Corner.
  2. Make sure the Kid’s Corner slider is set to On.
  3. Tap Apps and select your app from the list so it can launch in Kid’s Corner mode. You can tap launch kid’s corner from this screen to go immediately into Kid’s Corner mode.

Kid’s Corner Sample