Part 19: Implementing the Share Contract

Sign in to queue

Description

The Windows 8 charms can be tightly integrated into our app.  Here, we implement the Share Contract, allowing users to select a recipe and share the recipe text and images with other apps like email, etc.
 

Embed

Download

Download this episode

The Discussion

  • User profile image
    gokulit

     

    "When i am executing !!!Working with contracts: Search and share!!!! some errors occurred below i mentioned...

     

    Error    1    Type 'ContosoCookbook.ItemDetailPage' already defines a member called 'OnDataRequested' with the same parameter types   

  • User profile image
    gokulit

    your videos awesome...**************************************************************.thank you sir

  • User profile image
    BobTabor

    @gokulit: Since you saw an error that says a given class "already defines a member called ..." I would say you may have either pasted in code / typed in the same code TWICE.  I would search your entire project (Ctrl+Shift+F ... Find in Files) for the name of that method ... "OnDataRequest" and see if you have it more than once.  That's where I would start debugging.  Let me know if you get further.

  • User profile image
    Avi

    Is there a way to add facebook as a share option in the charm menu ?

  • User profile image
    BobTabor

    @Avi: I don't believe so (perhaps someone could comment if they have it working.)  I would think that Angel Facebook would need to have created a Windows Store app, and (b) implement the Share contract.  If that happens, then yes, definitely.

    Sounds like an opportunity for an enterprising third party to build something like that.  Smiley

  • User profile image
    golnazal

    opening thread

  • User profile image
    Adnan

    Hi, I am unable to run the Sharing content target app sample. I got error message and it says:

    "SharingTarget (incompatible) This project is incompatible with the current edition of visual studio"

    And other "Error ShareTarget.csproj: The project
    'ShareTarget.csproj' was created with a newer version of Visual Studio which is incompatible with your version. You can only open this project with newer versions of Visual Studio."

    I am using Studio Visual 2012 (Update 3) and OS is Windows 8.1. Can you solve this problem?

  • User profile image
    Clint

    @Adnan: are you using our sample or someone else's?  Sounds like your opening a Windows Store 8.1 application that needs Visual Studio 2013 or you opened the sample in VS 2013 previously and it converted stuff.

  • User profile image
    Adnan84

    @Clint: I am using our sample. I have never heard of Visual Studio 2013 but i will try to download latest version as 2013.  Smiley 

  • User profile image
    BobTabor

    Opening comments

  • User profile image
    youngistaan​boy

    @BobTabor: sir the sample on msdn is made up with visual studio 2013 & i have vs2012,so i cant handle in an older version.

  • User profile image
    BobTabor

    @youngistaanboy: Side-by-side install.  Works for me ... I have both on the same machine.

  • User profile image
    FAli

    Hey Dan ! Awesome tutorials, I just want to know how do i mail the data like you did in the start of the video?

  • User profile image
    Clint
    @FAli: share contract / charm is what you are going to need to search for.

Add Your 2 Cents