Quantcast
Channel: Active questions tagged blazor - Stack Overflow
Viewing all articles
Browse latest Browse all 4839

How can I declare an array for ChildContent RenderFragment

$
0
0

I have wrote 2 components:

  • MyLine.razor
  • MyTable.razor

Here is how I want to use this components:

<MyTable><MyLine /><MyLine /><MyLine /></MyTable>

Here is what I've wrote for MyTable.razor:

@code{   [Parameter]   public RenderFragment ChildContent { get; set; }}

It works, but I want to count all "MyLine" components.

Here is what I've tried:

   [Parameter]   public RenderFragment<MyLine> ChildContent { get; set; }   [Parameter]   public RenderFragment<List<MyLine>> ChildContent { get; set; }

But it does not work.

Any idea ?

Thanks


Viewing all articles
Browse latest Browse all 4839

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>