Exemple #1
0
        Task IShellItemController.GoToPart(List <string> parts, Dictionary <string, string> queryData)
        {
            var shellSectionRoute = parts[0];

            var items = Items;

            for (int i = 0; i < items.Count; i++)
            {
                var shellSection = items[i];
                if (Routing.CompareRoutes(shellSection.Route, shellSectionRoute, out var isImplicit))
                {
                    Shell.ApplyQueryAttributes(shellSection, queryData, parts.Count == 1);

                    if (CurrentItem != shellSection)
                    {
                        SetValueFromRenderer(CurrentItemProperty, shellSection);
                    }

                    if (!isImplicit)
                    {
                        parts.RemoveAt(0);
                    }
                    if (parts.Count > 0)
                    {
                        return(((IShellSectionController)shellSection).GoToPart(parts, queryData));
                    }
                    break;
                }
            }
            return(Task.FromResult(true));
        }