Export (0) Print
Expand All

How to: Start a contextual conversation with an IM call

Lync 2013

Learn how to use the Microsoft Lync Control ContextualInformation property to add the sender’s context to an instant messaging (IM) conversation, using Microsoft Silverlight or Microsoft Windows Presentation Foundation (WPF).

Last modified: July 01, 2013

Applies to: Lync 2013 | Lync Server 2013

Use contextual conversation to increase productivity by capturing the message sender’s context and setting up the receiver’s context. Adding context to the message in this way streamlines communication by allowing call participants to get on the same page quicker. Context is transmitted as a data structure that is composed of one or more pieces of contextual information. Context can be delivered as a conversation subject line or as application data. In its simplest form, it consists of a subject string, a contextual link that appears on the recipient’s conversation invite, or both. Contextual data can also include an application ID with associated application data. For more information, see Contextual Lync conversations.

The following procedure works for Silverlight and WPF applications.

To create the contextual conversation walkthrough application

  1. Create the application.

    For information about creating Silverlight and WPF applications, see How to: Create a Silverlight page that displays a Lync presence control. The following instructions assume this is a unified communications WPF application, but the information can be used with other application types.

  2. In Window1.xaml, add the following XAML.

    Note that the empty braces in the ApplicationId property escape the following ‘{’.

    <StackPanel>
      <StackPanel.Resources>
        <controls:ConversationContextualInfo 
          x:Key="contextualInfo" 
          ApplicationId="{}{21224942-AC24-4D0D-B0C7-6107D79448DF}"
          ApplicationData="your application data here"
    
          Subject="Try out this customized subject!"
        />
      </StackPanel.Resources>
        <controls:StartInstantMessagingButton 
          x:Name="startInstantMessaging"
          Source="sip:barbara@contoso.com"
          ContextualInformation="{StaticResource contextualInfo}"
        />
    </StackPanel>
    
    
  3. Edit the Source property on the StartInstantMessagingButton control to provide a valid value.

  4. Install and register the application on the sending and receiving computers.

    For information about contextual application registration, see Register contextual conversation packages.

  5. Build and run the application.

  6. Click the StartInstantMessagingButton control.

  7. Enter message text in the conversation window and then press ENTER.

  8. On the receiving computer, use the GetApplicationData method to retrieve the data or trap one of the Conversation object events.

Show:
© 2015 Microsoft