Hi.
Im generating components dynamicallt inside a column, i need it to change calor in base of a funcion that returns the color, but i does not work with radzen components:
This works:
<div style="@($"background-color:{ResultColor(item)}") ; box-shadow: 0 2px 6px rgba(0,0,0,0.1); border-radius: 0.75rem; border-width: 1px; width:100%;height:100% ">@item</div>
This not:
<RadzenCard style="@($"background-color:{ResultColor(item)}") ; box-shadow: 0 2px 6px rgba(0,0,0,0.1); border-radius: 0.75rem; border-width: 1px; width:100%;height:100% ">@item</RadzenCard>
And the error is:
Component attributes do not support complex content (mixed C# and markup). Attribute: 'style', text: '$"background-color:{ResultColor(item)}" ; box-shadow: 0 2px 6px rgba(0,0,0,0.1); border-radius: 0.75rem; border-width: 1px; width:100%;height:100% '