title: How to use delegate BackgroundWorker?
body: <p>I try to write a WPF application with Kinect, so I have write this code:</p>
  
  <pre><code>    static BackgroundWorker _bw = new BackgroundWorker();
      _bw.DoWork += bw_DoWork;
      _bw.RunWorkerAsync();
  
      dispatcherTimerGame = new System.Windows.Threading.DispatcherTimer();
      dispatcherTimerGame.Tick += new EventHandler(dispatcher_VerificaCarte);
      dispatcherTimerGame.Interval = new TimeSpan(0, 0, 1);
      dispatcherTimerGame.Start();
  
      void bw_DoWork(object sender, DoWorkEventArgs e)
      {
         try
         {
            this.sensorChooser = new KinectSensorChooser();
            this.sensorChooser.KinectChanged += SensorChooserOnKinectChanged;
            this.sensorChooserUi.KinectSensorChooser = this.sensorChooser;
            this.sensorChooser.Start();
            this.sensor = this.sensorChooser.Kinect;
            if (this.sensor != null)
            {
               DateTime dat1 = DateTime.Now;
               string date = DateTime.Now.ToString("dd-MMM-yy HH-mm");
               acquisizioneVideo = new Acquisizione("Video" + date + ".avi");
               this.sensor.ColorStream.Enable(ColorImageFormat.RgbResolution640x480Fps30);
               acquisizioneAudio = new AcquisizioneWaveAudio(180, this.sensor, "Audio" + date + ".wav");     acquisizioneAudio.recordAudio();
               acquisizioneVideo.recordVideo();
  
               this.sensor.ColorFrameReady += acquisizioneVideo.ColorImageReady;
  
            }
         }
      catch (Exception exc)
      {
         log.Error(exc);
      }
  }
  </code></pre>
  
  <p>So when I try to execute this code
   <code>this.sensorChooserUi.KinectSensorChooser = this.sensorChooser;</code>, 
  I Have this error: </p>
  
  <pre><code>[System.InvalidOperationException] = {"The calling thread cannot access this object because a different thread owns it."}"
  </code></pre>
  
  <p>How can I fixed it?</p>