AllowChildrenAttribute Class

AllowChildrenAttribute Class

Specifies the view model types that children of this view model are allowed to have in the page or library hierarchy.

[AttributeUsage(AttributeTargets.Class, AllowMultiple = true, Inherited = false)]
public sealed class AllowChildrenAttribute: Attribute, IPageModelAttribute, IContentModelAttribute

Inheritance  Attribute AllowChildrenAttribute

Implements  IPageModelAttribute, IContentModelAttribute

Constructors

Name Description
AllowChildrenAttribute(Type[]) Default constructor.

Properties

Name Description
ModelTypes Gets or sets the model types that children must have. For page model children, types must be valid page models, and for content model children, types must be valid content models.

Methods

Name Description
Apply(PageDefinition) Applies this attribute's settings to the definition model. Automatically called by the Redakt system on startup.
Apply(ContentDefinition) Applies this attribute's settings to the definition model. Automatically called by the Redakt system on startup.