liveBook · Manning

RenderFragment<T>

As explained in Pro ASP.NET Core 7, Tenth Edition

RenderFragment<T> is a Blazor delegate type representing renderable Razor content that receives a value of type T as its rendering context.

RenderFragment<T> represents Razor content that receives a value of type T. A component exposes it as a parameter, then invokes it like a method for each object it renders. section 34.3.2

Typed table rows

A TableTemplate configured with RowType="Person" receives People through RowData. Its RowTemplate uses Context="p" to render identifiers, names, departments, and locations for each Person.

How Pro ASP.NET Core 7, Tenth Edition covers it

How deep it goes
Explains parameter declaration, per-item invocation, and Razor context naming, but stops short of delegate internals.
Examples
Uses generic table rows for Person and Department data, with Context-based cells and configurable sorting or highlighting.
What it assumes
Assumes familiarity with Razor components, C# properties, collections, and generic type parameters.
What you can do after
Build reusable typed Razor templates and apply them to different entity collections.
How it connects
Connects typed render fragments with Blazor components, Razor markup, generic type parameters, and component parameters.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Pro ASP.NET Core 7, Tenth Edition. The section links point to the parts of the book it draws on.