I've tried a number of approaches to this, but when trying to navigate between one page and another in Windows 10 I'm getting some strange behaviour. I display my first page in app.xaml.cs:
View.MainPageView mp = new View.MainPageView();
Window.Current.Content = mp;
This displays the main page fine; however, I have a command that does effectively the same thing for my second page:
View.SecondView dv = new View.SecondView();
Window.Current.Content = dv;
What happens is that it displays the second page, but it is blank. When I try to inspect it using XAML Spy, it shows that the page is there; however, there is no content for it at all (that is, no controls showing).
Is there something particular about Windows 10 that might explain this or, alternatively, is there something about overriding the content in this way that might explain this behaviour?
EDIT:
It appears that the issue is caused by using a bound command, rather than a handled even in order to navigate; the following code works on a click event:
Frame rootFrame = Window.Current.Content as Frame;
rootFrame.Navigated += RootFrame_Navigated;
rootFrame.Navigate(typeof(View.SecondView), null);
But when called from a bound command, whilst it still shows the view, it is always blank. I initially thought this might be relating to the calling thread, but using the UI thread dispatcher makes no difference.