RatedContentRestrictions RatedContentRestrictions RatedContentRestrictions RatedContentRestrictions Class

Definition

Contains all behavior and functionality related to a user's Family Safety content settings.

public : sealed class RatedContentRestrictions : IRatedContentRestrictionspublic sealed class RatedContentRestrictions : IRatedContentRestrictionsPublic NotInheritable Class RatedContentRestrictions Implements IRatedContentRestrictions// You can use this class in JavaScript.
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Constructors

RatedContentRestrictions() RatedContentRestrictions() RatedContentRestrictions() RatedContentRestrictions()

Initializes a new instance of the RatedContentRestrictions class.

public : RatedContentRestrictions()public RatedContentRestrictions()Public Sub New()// You can use this method in JavaScript.
See Also

RatedContentRestrictions(UInt32) RatedContentRestrictions(UInt32) RatedContentRestrictions(UInt32) RatedContentRestrictions(UInt32)

Initializes a new instance of the RatedContentRestrictions class, with the specified age rating the app uses, to restrict content usage.

public : RatedContentRestrictions(unsigned int maxAgeRating)public RatedContentRestrictions(UInt32 maxAgeRating)Public Sub New(maxAgeRating As UInt32)// You can use this method in JavaScript.
Parameters
maxAgeRating
unsigned int UInt32 UInt32 UInt32

The max age rating.

Remarks

Restrictions are enforced based on the minimum user’s overall Family Safety age rating (expressed by PreferredAgeRating ), and the app-specific age rating value used in this constructor.

Methods

GetBrowsePolicyAsync() GetBrowsePolicyAsync() GetBrowsePolicyAsync() GetBrowsePolicyAsync()

Gets information that is used filter an app's content catalog.

public : IAsyncOperation<ContentRestrictionsBrowsePolicy> GetBrowsePolicyAsync()public IAsyncOperation<ContentRestrictionsBrowsePolicy> GetBrowsePolicyAsync()Public Function GetBrowsePolicyAsync() As IAsyncOperation( Of ContentRestrictionsBrowsePolicy )// You can use this method in JavaScript.
Returns

GetRestrictionLevelAsync(RatedContentDescription) GetRestrictionLevelAsync(RatedContentDescription) GetRestrictionLevelAsync(RatedContentDescription) GetRestrictionLevelAsync(RatedContentDescription)

Gets the policy that applies to a piece of content, for content browsing and consumption.

public : IAsyncOperation<ContentAccessRestrictionLevel> GetRestrictionLevelAsync(RatedContentDescription RatedContentDescription)public IAsyncOperation<ContentAccessRestrictionLevel> GetRestrictionLevelAsync(RatedContentDescription RatedContentDescription)Public Function GetRestrictionLevelAsync(RatedContentDescription As RatedContentDescription) As IAsyncOperation( Of ContentAccessRestrictionLevel )// You can use this method in JavaScript.
Parameters
Returns

This method returns these values:

RequestContentAccessAsync(RatedContentDescription) RequestContentAccessAsync(RatedContentDescription) RequestContentAccessAsync(RatedContentDescription) RequestContentAccessAsync(RatedContentDescription)

Determines whether the user is allowed to consume a piece of content.

public : IAsyncOperation<PlatForm::Boolean> RequestContentAccessAsync(RatedContentDescription RatedContentDescription)public IAsyncOperation<bool> RequestContentAccessAsync(RatedContentDescription RatedContentDescription)Public Function RequestContentAccessAsync(RatedContentDescription As RatedContentDescription) As IAsyncOperation( Of bool )// You can use this method in JavaScript.
Parameters
Returns

Returns true, if the user can consume the content. Otherwise, returns false.

Remarks

If the content is not allowed, this method will display a Content blocked by Family Safety dialog with options to request a parental override. Apps are expected to take no action if this method returns false.

Events

RestrictionsChanged RestrictionsChanged RestrictionsChanged RestrictionsChanged

An event handler to notify apps when there are changes to the user's content settings.

public : event EventHandler RestrictionsChanged<object>public event EventHandler RestrictionsChanged<object>Public Event RestrictionsChanged<object>// You can use this event in JavaScript.