ContactList control

Core concepts

Learn about using the ContactList control to display the Microsoft Lync 2013 contacts list and give users the ability to launch voice, instant messaging (IM), or email conversations with any of their contacts.

Applies to: Lync 2013

In this article
Control overview
Members
Code example
Additional resources

Control overview

The control supports Group, Relationship, and Status views in the same manner as Microsoft Lync 2013 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 when double-clicked. 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 to 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 Lync 2013 class libraries reference.

Property

Description

GroupViewBySetting property

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

ItemContainerStyle property

Gets or sets the style that is used to display the contact item.

GroupItemContainerStyle property

Gets or sets the style that is used to display the 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.

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 that 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 toggles the display between the user’s friendly name and his or her SIP URI. The default is true.

ShowFrequentContacts property

Gets or sets a bool value that 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 that contains information used to customize the information that accompanies messages. For more information about using contextual information, see Contextual Lync conversations.

Model property

Reserved for internal use. This property might 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.

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

See also