title: Root frame content always null in Windows Phone 8.1 app
body: <p>In the main view model of my app, I am creating an instance of a class that looks something like this (this has been simplified)</p>
  
  <pre><code>public class MyClass
  { 
      public void MyFunction()
      {
          var root = Window.Current.Content as Frame;
          var mainPage = root.Content as Page;
      }
  }
  </code></pre>
  
  <p>and then I am calling MyFunction(), but the root.Content property is always null.</p>
  
  <p>Why is this?</p>
  
  <p>root is not null</p>
  
  <p>The view is of type Page</p>
  
  <p>Thanks</p>