Interfaces

Project

Pages Html

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

Home |  Readme

[UsesLayout] attribute | The OWIN Framework Pages

The [UsesLayout] Attribute

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

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

This is an example of how use this attribute

    [IsRegion("header_bar")]
    [Container("div", "{ns}_header_bar_region")]
    [UsesLayout("header_bar")]
    internal class HeaderBarRegion : NavigationElement { }

LayoutName

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