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...

 
 
 
 
 
(9)
22,183 times
Add to favorites
11/25/2013
E-mail Twitter del.icio.us 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.
      
      http://code.msdn.microsoft.com/windowsapps/Sharing-Content-Target-App-e2689782
      
      http://blogs.msdn.com/b/visualstudio/archive/2011/11/01/debugging-contracts-using-windows-simulator.aspx
      
      
      I have more problems with the share contract, you can see where:
      http://social.msdn.microsoft.com/Forums/en-US/winappswithcsharp/thread/891f7aad-3787-485d-ab88-5e3715204c72/
  • 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.
      
      http://social.msdn.microsoft.com/Forums/sr-sp-latn/winappswithcsharp/thread/21a13cf8-fc84-49f3-bc32-04af1b354192