Export (0) Print
Expand All

Lync 2013 Preview sample applications

[This is preliminary documentation and is subject to change.]

When you install the Microsoft Lync 2013 Preview SDK, you get a set of Quick-Start Samples sample applications, including Windows Forms, Windows Presentation Foundation (WPF), and Silverlight 5 projects. These quick-start samples focus on specific features of the API. 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.

The three 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 Preview API object model.

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

Presence samples

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

Application

Description

MyNotebox

Populates a page with a Microsoft.Lync.Controls.MyNoteBox control and displays the signed in user’s display name and personal note in a text entry control.

  • WPF sample location: %PROGRAMFILES(X86)%\Microsoft Lync\SDK\Samples\micro\MyNoteBoxDesktop

  • Silverlight sample location: %PROGRAMFILES(X86)%\Microsoft Lync\SDK\Samples\micro\MyNoteBoxSilverlight

MyPresenceChooser

Populates a window with Microsoft.Lync.Controls.MyPresenceChooser control that lets a user choose a presence activity. The resulting availability state is displayed in a text block on the window.

  • WPF sample location: %PROGRAMFILES(X86)%\Microsoft Lync\SDK\Samples\micro\MyPresenceChooserDesktop

  • Silverlight sample location: %PROGRAMFILES(X86)%\Microsoft Lync\SDK\Samples\micro\MyPresenceChooserSilverlight

MyStatusArea

Populates a window with a Microsoft.Lync.Controls.MyStatusArea control that lets a user choose a presence activity and enter a personal note. Three text blocks on the page are bound to MyStatusArea control properties for user display name, availability state, and personal note. The text value of these text blocks are automatically updated when the corresponding properties of the MyStatusControl change.

  • WPF sample location: %PROGRAMFILES(X86)%\Microsoft Lync\SDK\Samples\micro\MyStatusAreaDesktop

  • Silverlight sample location: %PROGRAMFILES(X86)%\Microsoft Lync\SDK\Samples\micro\MyStatusAreaSilverlight

PresenceIndicator

Populates a list on a page with three Microsoft.Lync.Controls.PresenceIndicator instances. The user can hover a mouse pointer over any of the presence indicators to display a contact card a user. The ContactBase.Source property for each control instance is set by the sample application.

  • WPF sample location: %PROGRAMFILES(X86)%\Microsoft Lync\SDK\Samples\micro\PresenceIndicatorDesktop

  • Silverlight sample location: %PROGRAMFILES(X86)%\Microsoft Lync\SDK\Samples\micro\PresenceIndicatorSilverlight

Presence publication

Retrieve and publish information of the Self contact (currently signed in user) by using classes, enumerations, events, and methods of the Lync 2013 Preview API. It also shows how to sign in to Lync using the credentials of the active user. The sample uses the following classes and methods:

Path: %PROGRAMFILES(X86)%\Microsoft Lync\SDK\Samples\Micro\PresencePublication

Contact samples

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

Application

Description

ContactCard control list

Loads three Microsoft.Lync.Controls.ContactCard controls into a list into a list on a page in a Silverlight or WPF application.

  • WPF sample location: %PROGRAMFILES(X86)%\Microsoft Lync\SDK\Samples\micro\ContactCardDesktop

  • Silverlight sample location: %PROGRAMFILES(X86)%\Microsoft Lync\SDK\Samples\micro\ContactCardSilverlight

ContactList control

Populates a page with the Microsoft.Lync.Controls.ContactList control and then lists the SIP URI values for the contacts in the list.

  • WPF sample location: %PROGRAMFILES(X86)%\Microsoft Lync\SDK\Samples\micro\ContactListDesktop

  • Silverlight sample location: %PROGRAMFILES(X86)%\Microsoft Lync\SDK\Samples\micro\ContactListSilverlight

CustomContactList control

Populates a page with a Microsoft.Lync.Controls.CustomContactList and several child Microsoft.Lync.Controls.CustomContactListItem objects. The child objects are created and added at runtime by using C# code in a code-behind source file.

  • WPF sample location: %PROGRAMFILES(X86)%\Microsoft Lync\SDK\Samples\micro\CustomContactListAndcustomContactListItemDesktop

  • Silverlight sample location: %PROGRAMFILES(X86)%\Microsoft Lync\SDK\Samples\micro\CustomContactListAndcustomContactListItemSilverlight

ContactSearch control

Populates a page with a Microsoft.Lync.Controls.ContactSearch and conducts a search for used by user name or skill.

  • WPF sample location: %PROGRAMFILES(X86)%\Microsoft Lync\SDK\Samples\micro\ContactSearchDesktop

  • Silverlight sample location: %PROGRAMFILES(X86)%\Microsoft Lync\SDK\Samples\micro\ContactSearchSilverlight

Contact search with input box and search results

Populates a page with a Microsoft.Lync.Controls.ContactSearchInputBox control and a Microsoft.Lync.Controls.ContactSearchResultList control. The ContactSearchInputBox is bound to the ContactSearchResultList so that the result list displays search results based on what the user types in the search input box.

  • WPF sample location: %PROGRAMFILES(X86)%\Microsoft Lync\SDK\Samples\micro\ContactSearchInputBoxAndCustomSearchResultListDesktop

  • Silverlight sample location: %PROGRAMFILES(X86)%\Microsoft Lync\SDK\Samples\micro\ContactSearchInputBoxAndCustomSearchResultListSilverlight

Display Frequent and Favorite contacts

Populates a page with a list of favorite contacts and a list of frequent contacts. The sample uses the following classes and methods:

WPF sample location: %PROGRAMFILES(X86)%\Microsoft Lync\SDK\Samples\micro\DisplayFrequentAndFavoriteContacts

Add and remove a custom group

List the groups in your contact list and lets you add or remove a group. The sample uses the ContactManager.Groups property, the ContactManager.BeginAddGroup method, and the ContactManager.BeginRemoveGroup method.

Path: %PROGRAMFILES(X86)%\Microsoft Lync\SDK\Samples\Micro\AddCustomGroup

MoveContactBetweenGroups

Lists all custom groups in a user’s contact list and lets a user move a contact from one custom group to another custom group. The sample uses the following classes and methods:

Path: %PROGRAMFILES(X86)%\Microsoft Lync\SDK\Samples\Micro\MoveContactBetweenGroups

Add and remove a contact from a group

Adds and removes contacts from the Other Contacts group. The sample uses the following classes and methods:

Path: %PROGRAMFILES(X86)%\Microsoft Lync\SDK\Samples\Micro\AddRemoveContacts

Conversation samples

The quick-start samples in the following table show you how to interact with Lync conversations by using the objects of the Lync 2013 Preview API 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 Lync\SDK\Samples\micro\ButtonsDesktop

  • Silverlight sample location: %PROGRAMFILES(X86)%\Microsoft Lync\SDK\Samples\micro\ButtonsSilverlight

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 Lync\SDK\Samples\micro\AcceptConversation

Start an IM conversation using automation

StartConversation sample.

Start and dock an IM conversation using the StartInstantMessagingButton control

DockingConversationWindowSample

Start a Meet Now conference using automation

MeetNow

Join a meeting using automation

Joins a running meeting and notifies user if they are in the meeting lobby. JoinMeetingFromLobby.sln

Automation conversation

This sample uses the Automation class in the Lync 2013 Preview 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

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

Audio/Video Conversation

This sample Uses the Microsoft.Lync.Model.Conversation and Microsoft.Lync.Model.Conversation.AudioVideo namespaces from the Microsoft Lync 2013 Preview 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

Persistent Chat samples

The following sample applications demonstrate how to add chat room features to your Microsoft Lync 2013 Preview SDK- enabled application

Application

Description

GetMessages

The GetMessages sample application shows how to get messages that have been posted to a persistent chat room and then display any new message that are posted to the chat room. In addition, the sample shows how to get the chat rooms that are in a user’s contact list and then keep that room collection synchronized with the contact list.

FollowedRoomList

The FollowedRoomList sample application shows how to get the persistent chat rooms that are in a user’s contact list and then keep that room collection synchronized with the contact list. For information about how to find persistent chat rooms that are not in a user’s contact list, see RoomQuery application.

RoomQuery

The RoomQuery sample application shows how to get a collection of persistent chat rooms that are not in a user’s contact list. For information about finding persistent chat rooms that are in a user’s contact list, see FollowedRoomList application.

PostMessage

The PostMessage sample application shows how to post a plain-text message to a persistent chat room in a user’s contact list and verify that the message posted successfully. In addition, the sample shows how to get a chat room from the contact list.

GetRoomParticipants

The GetRoomParticipants sample application shows how to get a list of persistent chat room participants. In addition, the sample shows how to get a chat room from the contact list.

MessageFilterAddIn

The MessageFilterAddIn sample application shows how to get a hosting group for a persistent chat room, catch outgoing messages before they are posted to the hosting chat room, run filtering and formatting logic on the messages, and then send the resulting message to the hosting chat room.

Resource sharing samples

The following sample applications demonstrate how to share resources in a conversation and then manage user’s control of a shared resource

Application

Description

ResourceSharing

Demonstrates all of the Lync 2013 Preview API objects used in resource sharing

Content sharing samples

The following sample applications demonstrate how to share whiteboards, PowerPoint slide decks, and native file attachments in a conversation.

Application

Description

ContentModalitySample

Shows how to create a conversation and then share a whiteboard and a PowerPoint slide deck. If a PowerPoint slide deck is shared, the sample lets a user scroll forward and backward in the slide deck. The sample uses the following classes and methods:

WPF sample location: %PROGRAMFILES(X86)%\Microsoft Lync\SDK\Samples\micro\ContentSharingModality

The following samples provide complete application examples using the Lync 2013 Preview API. These examples illustrate the use of Lync 2013 Preview API in real world scenarios.

Contact Center Extension

The Contact Center reference application enables an Enterprise to be contacted by external customers via the most appropriate channel: Web Chat, Click-To-Call, PSTN, or federation with the Windows Live Messenger, Yahoo!, or AOL clouds. It illustrates how application developers can take advantage of both Microsoft Lync 2013 Preview API and Microsoft Unified Communications Managed API 4.0 Preview to implement a powerful Business To Consumer (B2C) solution with Microsoft Lync 2013 Preview extensions for Agents and Supervisors and a custom skill-based routing match maker powered by UCMA 4.0 Preview.

Features include:

  • The reference application makes use of the Microsoft Lync 2010 Conversation Window Extension to host two Silverlight 4.0 Web applications: an Agent Dashboard, and a Supervisor Dashboard.

  • The Agent Dashboard provides Customer Service Representatives with a contextual extension to Lync 2013 Preview to serve customers. In particular, the Agent Dashboard allows receiving real-time and historical contextual information about the customer, or controlling the customer interactions. For example, the agent can escalate the call to an expert, or put the customer on hold, etc.

  • The Supervisor Dashboard provides Supervisors with the ability to view the activity of their Customer Service Representatives and to initiate a monitoring session for quality purposes. It allows a Supervisor to silently monitor a customer interaction, whisper coaching instructions to a Customer Service Representative, and intervene.

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

Conversation Translator

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

Features include:

  • The sample provides an example architecture for registering for and handling asynchronous Lync 2013 Preview 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 application demonstrates the use of Microsoft Lync controls in a Silverlight application. The application is a demo, representing a tool used by a fictitious company called Fabrikam Inc. It tracks a list of proposals and sales people in the company.

Features include:

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

Community Additions

Show:
© 2014 Microsoft