Interfaces

Project

Pages Html

NuGet packageOwin.Framework.Pages.Html
GitHub sourceOwinFramework.Pages.Html

Home |  Readme

[UsesComponent] attribute | The OWIN Framework Pages

The [UsesComponent] Attribute

Attach the [UsesComponent] attribute on elements that contain exactly one child element to define that child is a component.

Example usage

    [IsRegion("footer")]
    [Container("div", "{ns}_footer-region")]
    [UsesComponent("footer")]
    internal class MainFooterRegion : NavigationElement { }

The [UsesComponent()] attribute has the following properties you can set.

ComponentName

Specifies the name of the component to place within this page element. If the component is part of the same package then you can just use the component name on its own. If the component is in a different package from the element you are attaching this attribute to, then you need to prefix the component name with the package namespace and a colon.