Lync conversation samples

Code sample topic

Learn about the conversation-related quick-start samples that are installed with Microsoft Lync 2013 SDK.

Applies to: Lync 2013 | Lync Server 2013

In this article
Conversation samples
Additional resources

Conversation samples

The quick-start samples in the following table show how to interact with Lync conversations by using Lync 2013 API objects and controls from the Microsoft.Lync.Controls namespace.

Application

Description

ButtonsDesktop

Shows how to display Lync conversation-starting controls in a list. The ContactBase.Source property for each control is set to the URI of a user. The controls used in the sample include: Microsoft.Lync.Controls.StartInstantMessagingButton, Microsoft.Lync.Controls.StartAudioCallButton, Microsoft.Lync.Controls.StartVideoCallButton, Microsoft.Lync.Controls.ShareDesktopButton, Microsoft.Lync.Controls.SendFileButton, Microsoft.Lync.Controls.SendEmailButton, and Microsoft.Lync.Controls.ScheduleMeetingButton.

  • WPF sample location: %PROGRAMFILES(X86)%\Microsoft Office 2013\LyncSDK\Samples\microsamples.zip\ButtonsDesktop

  • Silverlight sample location: %PROGRAMFILES(X86)%\Microsoft Office 2013\LyncSDK\Samples\microsamples.zip\ButtonsSilverlight

Download the sample from Code Gallery at the following locations:

AcceptConversation

Displays a window that registers for the ConversationManager.ConversationAdded event and then notifies the user when a conversation invitation is received. If the user chooses to ignore the invitation, the window ends the new conversation. The sample uses the following classes and methods:

WPF sample location: %PROGRAMFILES(X86)%\Microsoft Office 2013\LyncSDK\Samples\microsamples.zip\AcceptConversation

Download the sample from Code Gallery at the following location:

StartConversation

Uses the Automation class in the Lync Model API to start a new conversation with one Lync contact. Features include:

  • Uses the Automation API in Lync to start a new conversation with new Lync contacts.

  • The conversation can start with IM modalities.

Path: %PROGRAMFILES%\Microsoft Office 2013\LyncSDK\Samples\microsamples.zip\StartConversation or %PROGRAMFILES(X86)%\Microsoft Office 2013\LyncSDK\Samples\microsamples.zip\StartConversation

Download the sample from Code Gallery at the following location:

ConversationTranslator

Uses the Microsoft.Lync.Model.Conversation namespace from the Lync Model API to intercept instant messages and provide translation by using Bing Web Services. Features include:

  • Provides sample architecture for registering for and handling asynchronous Lync SDK events in Silverlight.

  • Register for two Conversation related events:

    • ParticipantAdded.

    • InstantMessageReceived.

  • Use the InstantMessageModality.BeginSendMessage() method and callback.

  • Uses the Bing Translator Web Service.

Path: %PROGRAMFILES%\Microsoft Lync\SDK\Samples\ConversationTranslator or %PROGRAMFILES(X86)%\Microsoft Lync\SDK\Samples\ConversationTranslator

Download the sample from Code Gallery at the following location:

MeetNow

Starts a MeetNow conference by using the BeginMeetNow() method from the Lync Automation class. Features include:

  • Start a MeetNow conference using the Lync Automation class.

Path: %PROGRAMFILES%\Microsoft Lync\SDK\Samples\MeetNow or %PROGRAMFILES(X86)%\Microsoft Lync\SDK\Samples\MeetNow

Download the sample from Code Gallery at the following location:

JoinMeetingFromLobby

Joins a running meeting and notifies user if they are in the meeting lobby. Features include:

  • Starts a JoinMeeting conference by using Lync Automation class.

Path: %PROGRAMFILES%\Microsoft Lync\SDK\Samples\JoinMeetingFromLobby or %PROGRAMFILES(X86)%\Microsoft Lync\SDK\Samples\JoinMeetingFromLobby

Download the sample from Code Gallery at the following location:

Automation conversation

This sample uses the Automation class in the Lync 2013 API to start a new conversation with one or more Lync contacts. Features include:

  • Uses the Automation API in Lync to start a new conversation with a set of Lync contacts.

  • The conversation can be started with one or more modalities at the same time.

  • Shows how to set up specific settings for each conversation modality.

Path: %PROGRAMFILES%\Microsoft Lync\SDK\Samples\Automation or %PROGRAMFILES(X86)%\Microsoft Lync\SDK\Samples\Automation

Download the sample from Code Gallery at the following location:

Conversation Window Docker

This application demonstrates the ability to dock a conversation window within another WPF application. Features include:

  • Docks a conversation window into a WPF application.

  • Demonstrates how to use a WindowsFormsHost to dock a conversation window.

  • Shows how to handle the different events raised by a conversation window.

  • Shows how to flash the window when the conversation window requires attention.

Path: %PROGRAMFILES%\Microsoft Lync\SDK\Samples\DockingConversationWindowSample or %PROGRAMFILES(X86)%\Microsoft Lync\SDK\Samples\DockingConversationWindowSample

Download the sample from Code Gallery at the following location:

Audio/Video Conversation

This sample Uses the Microsoft.Lync.Model.Conversation and Microsoft.Lync.Model.Conversation.AudioVideo namespaces from the Lync 2013 API to implement a conversation window. Features include:

  • Implements a fully functional audio/video conversation window.

  • Shows how to register and handle conversation manager and audio/video conversation events.

  • Uses the most common features of Conversation, AVModality, AudioChannel, and VideoChannel.

Path: %PROGRAMFILES%\Microsoft Lync\SDK\Samples\AudioVideoConversation or %PROGRAMFILES(X86)%\Microsoft Lync\SDK\Samples\AudioVideoConversation

Download the sample from Code Gallery at the following location:

See also