Exemplo n.º 1
0
 private void NavigationManager_LocationChanged(object sender, Microsoft.AspNetCore.Components.Routing.LocationChangedEventArgs e)
 {
     NavigationManager.LocationChanged -= NavigationManager_LocationChanged;
     ParentMenu?.MarkAsRequireRender();
     TopMenu.MarkAsRequireRender();
     TopMenu.Refresh();
 }
Exemplo n.º 2
0
        protected override void OnInitialized()
        {
            base.OnInitialized();
            Func <string, bool> matchFunc = TopMenu.Match;

            if (matchFunc == null)
            {
                matchFunc = DefaultMenuMatcher;
            }
            if ((!string.IsNullOrWhiteSpace(Options.DefaultActiveIndex) && Options.DefaultActiveIndex == Index) || matchFunc(Route))
            {
                TopMenu.ActivateItem(this);
                RequireRender = true;
                ParentMenu?.MarkAsRequireRender();
                TopMenu.MarkAsRequireRender();
                TopMenu.Refresh();
            }
        }