How to detect if an app is running in Kid’s Corner
This article explains how to programmatically detect whether an application is running in Kids mode on Windows Phone 8.
Article Metadata
Code Example
Tested with
Compatibility
Article
Contents |
Overview
Windows Phone 8 introduces Kid's Corner, a device mode where children can only access games, apps, videos and music that the owner approves - without risk to other important content like the address book.
Apps can make themselves more "Kid's Corner Friendly" by configuring available content, features and functionality when running in this mode. For example, this could include changing graphics, hiding menu options for in-app purchase and selecting appropriate advertisements.
This article shows how you can detect that the app is running in Alternate mode (Kids Corner).
Solution
The static property Modes of Windows.Phone.ApplicationModel.ApplicationProfile class can be used to detect if an application is running in kid’s corner mode.
This property returns an enum ApplicationProfileModes value. This enum has two members :
- Default : application is running normally.
- Alternate : application is running in Kid’s Corner mode.
To test the running mode, you can use this simple function :
using Windows.Phone.ApplicationModel; //required namespace
...
bool RunInKidsCornerMode()
{
return ApplicationProfile.Modes == ApplicationProfileModes.Alternate;
}
Test code
A code example/test code can be downloaded from here: Media:TestKidsCorner.zip
The example app simply uses the previous function to display the text “Run in Normal mode” or “Run in kid's corner mode”.
References
- How to detect that your app is running in Kid’s Corner (Windows Phone Developer Blog)
- Windows.Phone.ApplicationModel.ApplicationProfile (Dev Center)
- enum ApplicationProfileModes (Dev Center)


Contents
Hamishwillee - Subedited/comments
Hi Yan
Firstly thanks, this I believe is a very useful FAQ - covering material I hadn't thought about.
I have subedited to give this more structure. Please check you are happy with this.
I moved the namespace declaration into the code block. I would like to highlight this better and having a separate section does that- but it just looked odd. We might separate into a different code block though, above the code snippet. Is there anything else other than "using" that someone might need to get this to work? Also in the general case - are there for example settings in the app manifest that you might need to know about like a security capability?
I gave the title a slight modification. Normally I'd have included the platform in the title "How to detect if an app is running in Kid’s Corner on Windows Phone" but seems a bit redundant in this case. Normally we would specify the platform.
I have forwarded to the moderators to discuss too. They might have better advice on how we can help standardise this.
Regards
Hamishhamishwillee 02:08, 21 March 2013 (EET)
Yan -
Hi. Structure is better. I'll write another QR with this structure.
Thanks.
Yanyan_ 11:25, 21 March 2013 (EET)
Hamishwillee - Great.
Have you tested this on a real device, and if so, which one?hamishwillee 11:32, 21 March 2013 (EET)
Yan -
Lumia 920. I can test on lumia 820 too.
I can't run wp 8 emulator.. Cpu too old.
.yan_ 11:36, 21 March 2013 (EET)
Hamishwillee - Thanks
I've added this device to the ArticleMetaData.hamishwillee 01:26, 22 March 2013 (EET)
Hamishwillee - Yan, Sara
Yan, in case you didn't notice, Sara translated this to Portuguese. Sara, thanks very much. I really liked this article (was new to me) so a good choice.hamishwillee 10:31, 20 May 2013 (EEST)
Yan -
happy to read it :D Sara if you need help or if you find improvement, do not hesitate.
Yanyan_ 12:01, 20 May 2013 (EEST)