32 lines
584 B
C#
32 lines
584 B
C#
|
|
namespace MBS.Web.UI.WebControls;
|
|
|
|
public class Menu : ContainerBase
|
|
{
|
|
protected override string TagName => "ul";
|
|
protected override IEnumerable<string> GetStyleClasses()
|
|
{
|
|
return new string[] { "uwt-menu" };
|
|
}
|
|
|
|
private IEnumerable<MenuItem>? _items = null;
|
|
|
|
public Menu()
|
|
{
|
|
}
|
|
public Menu(IEnumerable<MenuItem> items)
|
|
{
|
|
_items = items;
|
|
}
|
|
|
|
protected override IEnumerable<Control> GetChildControls()
|
|
{
|
|
if (_items != null)
|
|
{
|
|
return _items;
|
|
}
|
|
return new Control[0];
|
|
}
|
|
|
|
}
|