Use the ContactList control to display the Microsoft Lync 2010 contacts list, and give users the ability to launch voice, instant messaging (IM), or e-mail conversations with any of their contacts. The control supports Group, Relationship, and Status views, in the same manner as Microsoft Lync 2010, and includes the option to switch between status only, and status with photo display modes. The ContactList control gives users the ability to copy, move, delete, multi-select and sort contacts, set status alerts, and manage privacy settings.

There are two differences in the behavior of this control between the Windows Presentation Foundation (WPF) and Microsoft Silverlight versions:

  • The WPF version of this control launches the default conversation with a contact on double-click. Silverlight on the other hand, does not support double click.

  • The WPF version of this control includes clipboard functionality on the context menu to copy the URI of one or more selected contacts, as well as paste a copied set of contacts into a new custom group. The Silverlight version does not support clipboard functionality.

ContactList

Members

Notable ContactList control public properties and events relating to unified communications appear in the following table. For a full list, see topics in the Lync 2010 API Class Library documentation.

Property

Description

GroupViewBySetting property

Gets or sets an enumerable which specifies the manner in which contacts are aggregated. The default is by Groups.

ItemContainerStyle property

Gets or sets the Style that is used to display contact Item.

GroupItemContainerStyle property

Gets or sets the Style that is used to display root group.

PersonTwoLineItemTemplate property

Gets or sets the DataTemplate used to render a contact when the ContactLayoutView property is set to TwoLines mode.

TelephoneTwoLineItemTemplate property

Gets or sets the DataTemplate used to render a telephone-only contact when the ContactLayoutView property is set to TwoLines mode.

GroupTwoLineItemTemplate property

Gets or sets the DataTemplate used to render a DistributionGroup-type contact when the ContactLayoutView property is set to TwoLines mode.

BotTwoLineItemTemplate property

Gets or sets the DataTemplate used to render an Automaton, AutoAttendant, or Huntgroup contact when the ContactLayoutView property is set to TwoLines mode. For more information about presentity types, please refer to PresentityType elsewhere in the Microsoft Lync 2010 SDK documentation.

PersonItemTemplate property

Gets or sets the DataTemplate used to render a person item contact when the ContactLayoutView property is set to Status only mode.

TelephoneItemTemplate property

Gets or sets the DataTemplate used to render a telephone item contact when the ContactLayoutView property is set to Status only mode.

GroupItemTemplate property

Gets or sets the DataTemplate used to render a group item contact when the ContactLayoutView property is set to Status only mode.

BotItemTemplate property

Gets or sets the DataTemplate used to render a bot item contact when the ContactLayoutView property is set to Status only mode.

ShowPivotBar property

Gets or sets a bool value that determines whether group pivot buttons are displayed. The default is True .

SortBySetting property

Gets or sets a value which toggles the sort order. The default is Display Name .

ContactLayoutView property

Gets or sets an enumerated value that toggles the display between Show Photos and Show Status Only. The default is Show Photos .

ShowFriendlyName property

Gets or sets a value which toggles the display between the user's friendly name and their SIP URI. The default is true .

ShowFrequentContacts property

Gets or sets a bool value which toggles the display of the Frequent Contacts group. This setting only applies to the contact list when the GroupViewBySetting property is set to "Group". It does not apply when the setting is "Status" or "Relationship".

ContextualInformation property

Gets or sets a data structure which contains information used to customize the information that accompanies messages. For more information on the use of contextual information, see the topics listed at Contextual Conversations .

Model property

Reserved for internal use. This property may appear in XAML text when editing templates. To preserve control functionality it should remain unchanged.

Code Example

The following example can be used for Silverlight and WPF application development.

  Copy imageCopy Code
<StackPanel>
  <controls:ContactList Height="180" Width="500"/>
</StackPanel>

See Also

Other Resources