Merge pull request #31928 from hakenr/blazor-layouts-folder-names-formating
commit
d1c9f27605
|
@ -28,7 +28,7 @@ A Blazor layout is a Razor component that shares markup with components that ref
|
|||
|
||||
To create a layout component:
|
||||
|
||||
* Create a Razor component defined by a Razor template or C# code. Layout components based on a Razor template use the `.razor` file extension just like ordinary Razor components. Because layout components are shared across an app's components, they're usually placed in the app's shared or layout folder. However, layouts can be placed in any location accessible to the components that use it. For example, a layout can be placed in the same folder as the components that use it.
|
||||
* Create a Razor component defined by a Razor template or C# code. Layout components based on a Razor template use the `.razor` file extension just like ordinary Razor components. Because layout components are shared across an app's components, they're usually placed in the app's `Shared` or `Layout` folder. However, layouts can be placed in any location accessible to the components that use it. For example, a layout can be placed in the same folder as the components that use it.
|
||||
* Inherit the component from <xref:Microsoft.AspNetCore.Components.LayoutComponentBase>. The <xref:Microsoft.AspNetCore.Components.LayoutComponentBase> defines a <xref:Microsoft.AspNetCore.Components.LayoutComponentBase.Body> property (<xref:Microsoft.AspNetCore.Components.RenderFragment> type) for the rendered content inside the layout.
|
||||
* Use the Razor syntax `@Body` to specify the location in the layout markup where the content is rendered.
|
||||
|
||||
|
|
Loading…
Reference in New Issue