I can't think of how to achieve the following:
I need pass a collection (or array) of parameters to my Blazor component. The parameters passing are Blazor components. The collection of parameters must be passed as a nested tag. It is necessary to be able to call the rendering of each passed parameter-component separately.
That is, I want something like this:
<MyComponent>
<ParameterCollection>
<MyParameterComponent1>Caption1</MyParameterComponent1>
<MyParameterComponent2>Caption2</MyParameterComponent2>
<MyParameterComponent3>Caption3</MyParameterComponent3>
</ParameterCollection>
</MyComponent>
MyComponent code:
@code{
[Parameter]
public RenderFragment[] ParameterCollection {get; set;} //Runtime error
}
That I want to get is apparently implemented here commercial Blazor component (select the VIEW SOURCE tab). The GridColumns parameter is passed a collection of GridColumn components. More precisely, as I think, it is a collection of their corresponding RenderFragments. The question is how is it done?