Hi,
Please see the attached simplified project as reference. I'm trying to create dynamic content via the ContentTemplate element. The user should be able to select (via e.g. a listbox) what content panels to display in the dashboardlayout object and thus the panels that needs to be created are not known at initial rendering. When the user chooses a particular object to render in a new panel, the AddPanel method should be called and the ContentTemplate property should be set to a RenderFragment. Currently this is not working and I'm unsure how to approach this solution? This approach only works when I explicitly create the DashboardLayoutPanel element via html and then set the ContentTemplate property, but like I've mentioned before, the panels that needs to be created is not known before initial rendering and can therefore not be created explicitly in html. What would be the best approach to add panels and their respective content dynamically?
Thanks in advance for your assistance.
RC
Attachment:
BlazorApp_AddPanel_Dynamic_2b659e27.zip