locked
Tombstoning with PhotoChooserTask RRS feed

  • General discussion

  • I've came across a strange behavior when trying to tombstone using the PhotoChooserTask.

    If I have "Tombstone upon deactivation while debugging" NOT checked for the project and I click a button that will call code to launch the PhotochooserTask the PhotoChooserTask opens correctly.  I choose an image and my subscribed method to PhotoChooserTask is called and all is okay.

    If I have "Tombstone upon deactivation while debugging" CHECKED for the project and I click a button that will call code to launch the PhotochooserTask the PhotoChooserTask opens correctly.  I choose an image and my subscribed method to PhotoChooserTask is NOT called at first.  Instead the constructor where the PhotoChooserTask originated is called.  I step through the constructor and when the PhotoChooserTask.Completed code is reached:

    this.photoChooserTask.Completed += new EventHandler<PhotoResult>( imageTask_Completed );
    The subscribed method is called.
    I don't know why the constructor is called when the "Tombstone upon deactivation while debugging" is set in properties.  This is causing a lot of problems.

    Tuesday, February 28, 2012 9:01 AM

All replies

  • I know this thread is old, but I am seeing the same thing today, and haven't figured out how to fix. I'll spend another couple hours on it.

    Sunday, January 8, 2017 12:39 AM
  • UPDATE:

    The issue I had was caused because I wasn't setting the PhotoChooserTask.PixelHeight and PhotoChooserTask.PixelWidth in the constructor as well (I was setting them right before I called PhotoChooserTask.Show). Once I set these values, the PhotoChooserTask works correctly in the Tombstone scenario.

    Sunday, January 8, 2017 1:54 AM