Building a Blazor `RenderFragment` in base razor component to be used in derived?
Hey. So I have a base razor component that I want to derive from multiple times, as there will be a lot of duplicated code between the multiple derivations.
One thing I have stumbled into, is that I have a title which is largely similar between all the derived components. For this, I currently have the following:
This works, and in my derived razor components I can invoke
One thing I have stumbled into, is that I have a title which is largely similar between all the derived components. For this, I currently have the following:
This works, and in my derived razor components I can invoke
TitleFragment() and get the title that I desire. However, I wasn't sure if there was a way to create a RenderFragment in such a way without using the RenderTreeBuilder? Can I instead somehow declare this as razor syntax somewhere within my base razor component, or is this my only option?