Sharing content target app sample

This sample demonstrates how an app receives content shared from another app. This sample uses classes from the Windows.ApplicationModel.DataTransfer and Windows.ApplicationModel.DataTransfer.Share namespaces. Some of the classes you might want to re...

4.8 Star
28,241 times
Add to favorites
E-mail Twitter Digg Facebook
Sign in to ask a question

  • Cannot do debugging
    1 Posts | Last post July 22, 2012
    • I did debug for target application for 2 times, but now it not works :(
      I read this Debugging Contracts using Windows Simulator and in this sample: Sharing content target app sample is the same.
      I have more problems with the share contract, you can see where:
  • Exception thrown
    2 Posts | Last post June 02, 2012
    • When I run the share target sample, an exception is thrown at line 99 of MainPage.xaml.cs:
      An exception of type 'System.Runtime.InteropServices.COMException' occurred in System.Runtime.WindowsRuntime.dll but was not handled in user code
      WinRT information: Invoke request processing error.
      Additional information: Invalid window handle.
      The line does this:
      Window.Current.Content = this;
      Is there a workaround or fix for this?
    • I've run into this. I narrowed this down to having the main view active (or still not suspended) before invoking the app as a share target. Wait for the main app to get suspended and you shouldnt see this. 
      This is not a very friendly error. Hope someone addresses this. 
  • Exception thrown
    3 Posts | Last post May 24, 2012
    • Getting the same as Oluf N
      Seems to be related to the await on the line
      await shareTargetPage.ActivateAsync(args);
      I'm assuming something is getting disposed off which in turn causes the window.CurrentContext = this; to fail.
    • I find that target sharing seems to be unstable when the app is running while you perform the share.
      If you close the target share app (down swipe to close) and then perform target sharing, the operation is stable.
      If you need your app to be running while performing sharing, because you want the app to do something with the shared data, then alternatives to passing data between the two in memory could be surveyed.
    • This entry in the forums indicates that it is a known problem.