}
if (!(element is BaseShellItem baseShellItem))
- {
baseShellItem = element?.Parent as BaseShellItem;
- if(baseShellItem == null)
- return;
- }
//filter the query to only apply the keys with matching prefix
var filteredQuery = new Dictionary<string, string>(query.Count);
filteredQuery.Add(key, q.Value);
}
- baseShellItem.ApplyQueryAttributes(filteredQuery);
+ if (baseShellItem != null)
+ baseShellItem.ApplyQueryAttributes(filteredQuery);
+ else if (isLastItem)
+ ShellContent.ApplyQueryAttributes(element, query);
}
ShellNavigationState GetNavigationState(ShellItem shellItem, ShellSection shellSection, ShellContent shellContent, IReadOnlyList<Page> sectionStack)
ApplyQueryAttributes(Content as Page, query);
}
- static void ApplyQueryAttributes(object content, IDictionary<string, string> query)
+ internal static void ApplyQueryAttributes(object content, IDictionary<string, string> query)
{
if (content is IQueryAttributable attributable)
attributable.ApplyQueryAttributes(query);