title: Communicate between pages in wpf
body: <p>I have two Pages and one MainWindow.. I load the Pages in two Frames.. Now I want to execute methods from each other.. How can I do this?</p>
  
  <p>This is Page1.cs:</p>
  
  <pre><code>public partial class Page1 : Page
  {
      public Method1()
      {
          doSomething;            
      }
  }
  </code></pre>
  
  <p>This is Page2.cs:</p>
  
  <pre><code>public partial class Page2 : Page
  {
      public Method2()
      {
          doSomethingElse;            
      }
  }
  </code></pre>
  
  <p>In my MainWindow the following happens:</p>
  
  <pre><code>Frame1.Source = new Uri("/Source/Pages/Page1.xaml", UriKind.RelativeOrAbsolute);
  Frame2.Source = new Uri("/Source/Pages/Page2.xaml", UriKind.RelativeOrAbsolute);
  </code></pre>
  
  <p>Is there any way, to execute Method2 from Page1.cs, and Method1 from Page2.cs?</p>
  
  <p>Regards</p>