Silverlight - Do not set page title
-
12-12-2019 - |
Question
I have a Silverlight navigation application. I don't want navigation in this application to change the host page's Title property.
How do I implement this?
Solution
Only solutions that I found were to either set the title on every navigation page or use a base class for all the navigation pages and set the title on it. You could possibly manage your own Journal (which would prevent it from setting) but that would be a lot of work. Here is the relevant code in the NavigationService.
if (this.Journal.UseNavigationState && HtmlPage.IsEnabled)
{
HtmlPage.Document.SetProperty("title", name ?? ((uriBeforeMapping == null) ? string.Empty : uriBeforeMapping.OriginalString));
}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow