title: Passing variable between XAML pages
body: <p>I have two page : Start.xaml.cs and Settings.xaml.cs.
  In Setting.xaml.cs i  get the data form accelerometer just one time and fix a initial posiotion. In Start.xaml.cs i read the data from accelerometer continously. I want to get the accelerometer data variables from Settings.xaml.cs and bring them to Start.xaml.cs to compare them. Could you help me to make it or give me some source of information of how could i do this?</p>
  
  <p>Code for <strong>Start.xaml.cs</strong></p>
  
  <pre><code>Accelerometer acc = new Accelerometer();
  
  public Start()
  {
  
      InitializeComponent();
      acc.ReadingChanged += new EventHandler&lt;AccelerometerReadingEventArgs&gt;(acc_ReadingChanged);
      acc.Start();
  }
  
  void acc_ReadingChanged(object sender, AccelerometerReadingEventArgs e)
  {
      Deployment.Current.Dispatcher.BeginInvoke(() =&gt; ThreadSafeAccelerometerChanged(e));
  }
  
  void ThreadSafeAccelerometerChanged(AccelerometerReadingEventArgs e)
  {
      xText.Text = e.X.ToString("0.0000");
      yText.Text = e.Y.ToString("0.0000");
      zText.Text = e.Z.ToString("0.0000");
  }
  </code></pre>
  
  <p>And here is the code for <strong>Settings.xaml.cs</strong></p>
  
  <pre><code>Accelerometer acc = new Accelerometer();
  
  private void Calib_Click(object sender, RoutedEventArgs e)
  {
      acc.Start();
      acc.ReadingChanged += myAccelerometer_ReadingChanged;
  }
  
  void myAccelerometer_ReadingChanged(object sender, AccelerometerReadingEventArgs f)
  {
      this.Dispatcher.BeginInvoke(delegate()
      {
          xBlock.Text = "X:"+f.X.ToString("0.0000");
          yBlock.Text = "Y:"+f.Y.ToString("0.0000");
          zBlock.Text = "Z:"+f.Z.ToString("0.0000");
          acc.Stop();
      });
  }
  </code></pre>