@using WebSharpRSS.Models @using MudBlazor.Utilities @using CodeHollow.FeedReader @using Serilog Home Categories @foreach (CategoryTreeItem cat in Categories) { /* Category item*/ @if (cat.IsExpanded) { foreach (Feed feed in cat.Feeds) { /* Feed item */ @feed.Title } } } @code { public HashSet Categories = new HashSet(); protected override void OnInitialized() { Log.Verbose("Setting up test data"); Categories.Add(new CategoryTreeItem() { CategoryTitle = "Social", CategoryIcon = Icons.Material.Filled.People }); Categories.Add(new CategoryTreeItem() { CategoryTitle = "Blogs", CategoryIcon = Icons.Material.Filled.RssFeed }); Categories.Add(new CategoryTreeItem() { CategoryTitle = "Tech", CategoryIcon = Icons.Material.Filled.Computer }); Categories.Add(new CategoryTreeItem() { CategoryTitle = "News", CategoryIcon = Icons.Material.Filled.Newspaper }); } private void Callback(MudListItem obj) { switch (obj.Value) { case CategoryTreeItem catTreeItem: break; case Feed feed: break; } } }