Some form of DoesPageExist(...) method is something I considered in the past. This would probably involve adding this method onto IViewFactory (and maybe onto INavigationManager for completeness). Since this would be a breaking change I avoided it, however
there are definately benefits and this is something I'll revisit and maybe implement in the next version.
However, assuming that you are using the default MEF composition there is a workaround. All you really need to know is if a page is defined (pages still work if there is no view-model so this doesn't need to be checked). In your code you can add a new
import along the lines of,
private Lazy<object, PageMetadata> lazyPages;
Then you can simply enumerate through this list, access the metatdata (provided as part of the lazy-object) and confirm if the desired page exists. Note that since this imports a Lazy<> rather than the page itself then none of the page
objects actually get created.
public bool DoesPageExist(string pageName)
foreach(var page in lazyPages)
if (page.Metadata.PageName == pageName)
Hope this helps,