protected override void OnInitialized() { Index = MenuContext.CreateIndex(); if (!Disabled.HasValue || !Disabled.Value) { if (MenuContext.Variant == MenuVariant.SelectedMenu && Selected) { MenuContext.MarkActiveIndex(Index); } else if (MenuContext.ActiveIndex == -1) { MenuContext.MarkActiveIndex(Index); } } }