<h3>My Syncfusion Tooltip Test</h3>
<ul>
@foreach (var peep in people)
{
Person person = peep;
<SfTooltip Target=".target">
<li class="target" @attributes="@peep.htmlAttribute">@peep.Name</li>
</SfTooltip>
}
</ul>
@code {
public class Person
{
public int Age { get; set; }
public string Name { get; set; }
public Dictionary<string, object> htmlAttribute { get; set; }
}
public List<Person> people { get; set; }
protected override void OnInitialized()
{
base.OnInitialized();
people = new List<Person>
{
new Person
{
Name ="Jennifer Eccles",
Age =50,
htmlAttribute = new Dictionary<string, object>() { { "title", "Jennifer Eccles" } }
},
new Person
{
Name = "Carrianne",
Age =30,
htmlAttribute = new Dictionary<string, object>() { { "title", "Carrianne" } }
}
};
}
}
|