title: How to add a new XAML "Page", and its associated code-behind files, in C++/WinRT in Visual Studio?
body: <p>There are various related questions that give a hint how to <strong>add a new XAML <code>Page</code> properly to a WinRT/C++ project in Visual Studio</strong>, but none are specific to C++/WinRT. (I.e, <a href="https://stackoverflow.com/questions/32673327/how-to-add-a-new-xaml-view-with-code-behind">here</a>, <a href="https://stackoverflow.com/questions/1452353/how-do-i-add-a-second-code-behind-file-to-a-xaml-file">here</a>, and <a href="https://stackoverflow.com/questions/44342724/re-link-xaml-and-code-behind-in-visual-studio-solution">here</a>.)</p>
  
  <p>Further, though WinRT/C++ is a great improvement over C++/CX (in my opinion), almost all Microsoft documentation uses either C# or C++/CX as examples.</p>
  
  <p>To make matters worse, as of the date of this posting, <strong>when you use the Add Item feature in Visual Studio to add a XAML <code>Page</code>, it creates the page in C++/CX</strong> even for WinRT/C++ projects.</p>
  
  <p>Finally, there is (as of this date) no documentation provided by Microsoft for how to add a new XAML <code>Page</code> to a WinRT/C++ project, at least that I can find (see first paragraph).</p>
  
  <p>Ugh.</p>
  
  <p>To save others potentially hours, I have pieced together the hints and succeeded in properly adding a new XAML <code>Page</code> to a Visual Studio WinRT/C++ project.</p>
  
  <p>I am asking and answering the question: <strong>How do you add a new XAML <code>Page</code> to a WinRT/C++ project in Visual Studio?</strong></p>
  
  <hr>
  
  <p><strong>Addendum</strong></p>
  
  <p>I was missing the obvious! It turns out you <strong>can</strong> use Visual Studio to trivally add a WinRT/C++ XAML <code>Page</code>.  Despite looking as carefully as I (thought) I could.</p>
  
  <p>The (easy) correct answer is given in answer #2.</p>
  
  <p><strong>But I'll keep this question and answer up</strong> - in case anyone else blunders down the same path and can't find the option to add a XAML <code>Page</code> in WinRT/C++ in Visual Studio.</p>