locked
Is it possible to share a storageItem and a Uri link simultaneously using share source contract in windows 8? RRS feed

  • Question

  • Is it possible to share a storageItem and a Uri link simultaneously using share source contract in windows 8?

    As I have a requirement where in I need to share a link along with the file (storage item) simultaneously in the share

    source contract. If it is possible please provide me a sample.

    Tuesday, December 18, 2012 9:42 AM

Answers

  • no its not possible.. how the data is handled depends on the share target and you cant change that behavior

    Microsoft Certified Solutions Developer - Windows Store Apps Using C#

    • Proposed as answer by Jesse Jiang Thursday, December 20, 2012 2:24 AM
    • Marked as answer by Jesse Jiang Monday, December 24, 2012 3:04 AM
    Tuesday, December 18, 2012 4:27 PM

All replies

  • The MSDN documentations says that the DataPackage class has both SetUri and SetStorageItems member functions:

    http://msdn.microsoft.com/en-us/library/windows/apps/windows.applicationmodel.datatransfer.datapackage.aspx?cs-save-lang=1&cs-lang=cpp#code-snippet-1

    Maybe you can try both and see if you get any error after calling the second function?


    Raman Sharma | Program Manager, Visual C++ | @rasharm_msft

    (if my post has answered your question, please consider using the 'mark as answer' feature in the forums to help others)

    Tuesday, December 18, 2012 10:09 AM
  • I have tried it with DataPackage class. But on using SetUri and SetStorageItem member functions I am able to see either the uri that has to be shared or

    the storageItem that has to be shared (as attachment) depending on the target application selected. When I select the mail app then only link is available

    but when I select the skydrive application the storageItem is available. But this is not the requirement I need both the storageItem and the uri to be available

    in the mail application (atleast in the mail application) . Is this possible to accomplish? If yes please provide a sample ....

    Tuesday, December 18, 2012 11:51 AM
  • no its not possible.. how the data is handled depends on the share target and you cant change that behavior

    Microsoft Certified Solutions Developer - Windows Store Apps Using C#

    • Proposed as answer by Jesse Jiang Thursday, December 20, 2012 2:24 AM
    • Marked as answer by Jesse Jiang Monday, December 24, 2012 3:04 AM
    Tuesday, December 18, 2012 4:27 PM
  • no its not possible.. how the data is handled depends on the share target and you cant change that behavior

    Microsoft Certified Solutions Developer - Windows Store Apps Using C#

    Tuesday, December 18, 2012 4:27 PM
  • no its not possible.. how the data is handled depends on the share target and you cant change that behavior

    Microsoft Certified Solutions Developer - Windows Store Apps Using C#

    Tuesday, December 18, 2012 4:27 PM