title: How to navigate the Content Presenter in the Child View Model?
body: <p><strong>Goal</strong></p>
  <p>My actual goal is to navigate the <code>ContentPresenter</code> not by the main navigation, but via a button within the navigated page.</p>
  <p><strong>My current results</strong></p>
  <p>This is my Main navigation on the left hand side:</p>
  <p><a href="https://i.stack.imgur.com/HDgU5.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/HDgU5.png" alt="enter image description here" /></a></p>
  <p>When clicked on either of the main navigation items, the <code>ContentPresenter</code> will load it's ViewModel.</p>
  <p>Here is the <code>Home</code> tab</p>
  <p><a href="https://i.stack.imgur.com/sI2KW.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/sI2KW.png" alt="enter image description here" /></a></p>
  <p>and the <code>Some Other tab</code></p>
  <p><a href="https://i.stack.imgur.com/JEEfK.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/JEEfK.png" alt="enter image description here" /></a></p>
  <p><strong>Expected results</strong></p>
  <p>My expectation is to click on the button (See image below) from the loaded View Model, and navigate to the other view model...</p>
  <p><a href="https://i.stack.imgur.com/sI2KW.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/sI2KW.png" alt="enter image description here" /></a></p>
  <p>But I am not sure how to implement such idea.</p>
  <p><strong>Code</strong></p>
  <p><strong>Page View Model</strong></p>
  <pre><code>public class PageViewModel
  {
      public string Title { get; set; }
      public object Content { get; set; }
      public List&lt;PageViewModel&gt; Children { get; set; }
  }
  </code></pre>
  <p><strong>Main View Model</strong></p>
  <pre><code>public class MainViewModel
  {
      public List&lt;PageViewModel&gt; Navigation { get; set; }
      public MainViewModel()
      {
          Navigation = new List&lt;PageViewModel&gt;
          {
              new PageViewModel
              {
                  Title = &quot;Home&quot;,
                  Content = new HomeViewModel()
              },
              new PageViewModel
              {
                  Title = &quot;Some Other Tab&quot;,
                  Content = new SomeOtherViewModel()
              }
          };
      }
  }
  </code></pre>
  <p><strong>MainWindow.xaml</strong></p>
  <pre><code>...
      &lt;Window.DataContext&gt;
          &lt;local:MainViewModel /&gt;
      &lt;/Window.DataContext&gt;
      &lt;Grid&gt;
          &lt;Grid.ColumnDefinitions&gt;
              &lt;ColumnDefinition Width=&quot;Auto&quot; /&gt;
              &lt;ColumnDefinition /&gt;
          &lt;/Grid.ColumnDefinitions&gt;
  
          &lt;StackPanel&gt;
              &lt;ListView ItemsSource=&quot;{Binding Navigation}&quot;
                        x:Name=&quot;Nav&quot;&gt;
                  &lt;ListView.ItemTemplate&gt;
                      &lt;DataTemplate DataType=&quot;{x:Type local:PageViewModel}&quot;&gt;
                          &lt;TextBlock Text=&quot;{Binding Title}&quot; /&gt;
                      &lt;/DataTemplate&gt;
                  &lt;/ListView.ItemTemplate&gt;
              &lt;/ListView&gt;
          &lt;/StackPanel&gt;
  
          &lt;ContentPresenter Content=&quot;{Binding ElementName=Nav, Path=SelectedItem.Content}&quot; 
                            Grid.Column=&quot;1&quot;/&gt;
  
      &lt;/Grid&gt;
  &lt;/Window&gt;
  </code></pre>
  <p><strong>Home View Model</strong></p>
  <pre><code>public class HomeViewModel
  {
      public string SomeTitle { get; set; }
      public HomeViewModel()
      {
          SomeTitle = &quot;Hello Home ViewModel&quot;;
      }
  }
  </code></pre>
  <p><strong>Some Other View Model</strong></p>
  <pre><code>public class SomeOtherViewModel
  {
      public string SomeTitle { get; set; }
      public SomeOtherViewModel()
      {
          SomeTitle = &quot;Hello SomeOther View Model&quot;;
      }
  }
  </code></pre>
  <p><strong>Question</strong></p>
  <p>What would be the correct implementation to navigate via the internal (child) view model?</p>