title: Modern UI how to go to another page from another link
body: <p>I am currently using Modern UI from CodePlex. It is great and easy to use but there are some classes and events that I am not familiar with. Example: I have two GroupLinks named "Patients" and "Configurations". There are several pages in each of the GroupLinks. I tried to navigate from one page to another using a button click event. It worked. But when I tried navigating from Page1 of GroupLink2 to Page1 of GroupLink1, it still worked, but the problem was the active GroupLink remained in GroupLink2 instead of GroupLink1 just like the screenshots show below:</p>
  
  <p><img src="https://i.stack.imgur.com/wOVlM.png" alt="Configuration GroupLink2, I will click the New Entry"></p>
  
  <p><img src="https://i.stack.imgur.com/ORi9f.png" alt="The page navigated to PatientPage, but the GroupLink is still GroupLink2"></p>
  
  <p>Btw, I used the code behind to navigate from Allergies(IrritantPage) to PatientsPage:</p>
  
  <pre><code>private void FilterControl_OnToPatientClick(object sender, RoutedEventArgs e)
      {            
          NavigationCommands.GoToPage.Execute("/MainContents/PatientGridPage.xaml", this);
      }
  </code></pre>
  
  <p>So how do I solve this?</p>
  
  <p>here are my MainWindow, Patient's Tab Page and Configuration's List Page</p>
  
  <p>MODERN WINDOW (Main Window)</p>
  
  <pre><code>&lt;mui:ModernWindow x:Class="DentalProto.MainWindow"
                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:mui="http://firstfloorsoftware.com/ModernUI"
                    Title="Dental" IsTitleVisible="True"
                    WindowStartupLocation="CenterScreen"
                    Width="1200"
                    Height="720"                       
                    ContentSource="/Pages/MainTabPage.xaml"
                    Closing="MainWindow_OnClosing"
                    &gt;
  
      &lt;mui:ModernWindow.MenuLinkGroups&gt;
          &lt;mui:LinkGroup DisplayName="User Name"&gt;
              &lt;mui:LinkGroup.Links&gt;
  
                  &lt;mui:Link DisplayName="Patients" Source="/Pages/MainTabPage.xaml" /&gt;
                  &lt;mui:Link DisplayName="Configurations" Source="/Pages/ConfigurationsListNav.xaml" /&gt;
  
              &lt;/mui:LinkGroup.Links&gt;
          &lt;/mui:LinkGroup&gt;
  
          &lt;mui:LinkGroup DisplayName="settings" GroupKey="settings"&gt;
              &lt;mui:LinkGroup.Links&gt;
                  &lt;mui:Link DisplayName="software" Source="/Pages/SettingsPage.xaml" /&gt;
              &lt;/mui:LinkGroup.Links&gt;
          &lt;/mui:LinkGroup&gt;
      &lt;/mui:ModernWindow.MenuLinkGroups&gt;
  
      &lt;mui:ModernWindow.TitleLinks&gt;
          &lt;mui:Link DisplayName="settings" Source="/Pages/SettingsPage.xaml" /&gt;
          &lt;mui:Link DisplayName="help" Source="https://www.facebook.com/" /&gt;
      &lt;/mui:ModernWindow.TitleLinks&gt;
  &lt;/mui:ModernWindow&gt;
  </code></pre>
  
  <p>MAINTAB PAGE (Patient Page)</p>
  
  <pre><code>&lt;UserControl x:Class="DentalProto.Pages.MainTabPage"
               xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
               xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
               xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
               xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
               xmlns:mui="http://firstfloorsoftware.com/ModernUI"
  
               mc:Ignorable="d" 
               d:DesignHeight="300" d:DesignWidth="1280"&gt;
      &lt;Grid &gt;
          &lt;!-- TODO: set @SelectedSource --&gt;
          &lt;mui:ModernTab Layout="Tab"&gt;
              &lt;mui:ModernTab.Links&gt;
                  &lt;!-- TODO: set @Source --&gt;
  
                  &lt;mui:Link DisplayName="Patient" Source="/MainContents/PatientGridPage.xaml" /&gt;
                  &lt;mui:Link DisplayName="Treatment Record" Source="/MainContents/TreatmentFillInPage.xaml"/&gt;
  
              &lt;/mui:ModernTab.Links&gt;
          &lt;/mui:ModernTab&gt;
      &lt;/Grid&gt;
  &lt;/UserControl&gt;
  </code></pre>
  
  <p>CONFIGURATIONLISTNAV (Configurations' Page)</p>
  
  <pre><code>&lt;UserControl x:Class="DentalProto.Pages.ConfigurationsListNav"
               xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
               xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
               xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
               xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
               xmlns:mui="http://firstfloorsoftware.com/ModernUI"
               mc:Ignorable="d" 
               d:DesignHeight="300" d:DesignWidth="300"&gt;
      &lt;Grid Style="{StaticResource ContentRoot}"&gt;
          &lt;!-- TODO: set @SelectedSource --&gt;
          &lt;mui:ModernTab Layout="List"&gt;
              &lt;mui:ModernTab.Links&gt;
                  &lt;!-- TODO: set @Source --&gt;
                  &lt;mui:Link DisplayName="Allergies" Source="/MainContents/IrritantGridPage.xaml"/&gt;
                  &lt;mui:Link DisplayName="Health Diseases" Source="/MainContents/HealthDiseaseGridPage.xaml"/&gt;
                  &lt;mui:Link DisplayName="Mouth Diseases" Source="/MainContents/MouthDiseaseGridPage.xaml"/&gt;
                  &lt;mui:Link DisplayName="Procedures"  Source="/MainContents/ProcedureGridPage.xaml"/&gt;
                  &lt;mui:Link DisplayName="Dentists" Source="/MainContents/DentistGridPage.xaml"/&gt;
              &lt;/mui:ModernTab.Links&gt;
          &lt;/mui:ModernTab&gt;
      &lt;/Grid&gt;
  &lt;/UserControl&gt;
  </code></pre>