Skip to content

Instantly share code, notes, and snippets.

@gskachkov
Last active April 9, 2018 17:15
Show Gist options
  • Save gskachkov/14a5488f613cb542186ae15813f88da6 to your computer and use it in GitHub Desktop.
Save gskachkov/14a5488f613cb542186ae15813f88da6 to your computer and use it in GitHub Desktop.
public class MainLayout :
BlazorComponent, ILayoutComponent, IComponent
{
protected override void BuildRenderTree(...)
{
base.BuildRenderTree(builder);
builder.OpenElement(1, "div");
builder.AddAttribute(2, "class", "container-...
builder.AddContent(3, "\n ");
...
builder.OpenComponent<NavMenu>(10);
builder.CloseComponent();
...
builder.AddContent(0x10, this.Body);
...
}
public RenderFragment Body { get; set; }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment