Code samples: Lync SDK

Code sample topic

Learn about the quick-start samples and application reference samples that are installed with Microsoft Lync 2013 SDK.

Applies to: Lync 2013 | Lync Server 2013

The two comprehensive reference samples provide a broader look at the API. Use a reference sample to see how to build an application that implements a complete scenario using combinations of Lync Controls and objects from the Lync 2013 API object model.

The SDK installation program places the samples in the *%PROGRAMFILES%\*Microsoft Lync\SDK\Samples folder on 32-bit computers and the %PROGRAMFILES(X86)%\Microsoft Lync\SDK\Samples folder on 64-bit computers.

Quick-start samples

When you install Microsoft Lync 2013 SDK, you get a set of quick-start sample applications, including Windows Forms, Windows Presentation Foundation (WPF), and Silverlight projects. These quick-start samples focus on specific API features. Refer to these samples when you want to see how to complete a small task such as putting a contact list control on a page in your WPF application.

Feature category

Description

Presence samples

The quick-start presence samples show how to publish and get presence for a contact by using presence controls or objects in the Lync 2013 API object model.

Lync contact samples

The quick-start contact samples show how to interact with Lync contacts by using the objects of the Lync 2013 API and controls from the Microsoft.Lync.Controls namespace.

Conversation samples

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

Persistent Chat samples

The Persistent Chat sample applications demonstrate how to add chat room features to your Microsoft Lync 2013 SDK-enabled application.

Resource sharing samples

The sharing sample applications demonstrate how to share resources and content in a conversation and then manage user’s control of a shared item.

Reference samples

The following samples provide complete application examples using the Lync 2013 API. These examples show how to use the Lync 2013 API in real-world scenarios.

Conversation translator

The ConversationTranslator sample application uses the Microsoft.Lync.Model.Conversation namespace from the Lync model API to intercept instant messages and provide translation using Bing Web Services.

Features:

  • The sample provides an example architecture for registering for and handling asynchronous Lync 2013 API events in Silverlight.

  • Register for two Conversation related events: ParticipantAdded and InstantMessageReceived.

  • Use the BeginSendMessage method and callback.

  • Uses the Bing Translator Web Service.

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

Proposal tracker

The ProposalTracker sample application shows how to use Lync Controls in a Silverlight application. The application includes a tool that is used by a fictitious company called Fabrikam Inc. that tracks a list of proposals and sales people in the company.

Features:

  • Demonstrates how to use the following Lync Controls in a Silverlight application.

    • MyStatusArea Control

    • PresenceIndicator Control

    • ContactCard Control

    • ContactList Control

    • CustomContactList Control

    • ContactSearchInputBox Control

    • ContactSearchResultList Control

  • Demonstrates how to use ContextualConversation between two conversation windows with the companion application called MiniProposalTracker that runs in Lync Conversation Window Extension.

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

See also