#101821
xyzzy
Member

Ok, figured this out – the typing needs to be a bit less…
@if (cboGamma == null)
{
cboGamma = new List<object>()
{
new {label = “L*”, value = “0”},
new {label = “sRGB”, value = “1”},
new {label = “V”, value = “2”}
};
}
List<object> cboGamma;
How do I detect the OnChange event event properties?  I have:
<ComboBox DataSource=”@cboGamma” OnChange=@cboGamma_Change DisplayMember=”label” ValueMember=”value” C Style=”margin-left: 5px; width: 80px”></ComboBox>
@code{
private void cboGamma_Change(Event eventObj)
{
ComboBoxItemClickEventDetail detail = eventObj[“Detail”];
string label = detail.Label;
int value = detail.Value;
}
But the eventObj[“Detail”] throws an error.  How do I get the Label and Value?