Partager via


ContactList Control

Use the ContactList control in Microsoft Lync 2010 Control applications to display the Microsoft Lync 2010 contacts list, and give users the ability to start voice, instant messaging (IM), or email 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 Microsoft Windows Presentation Foundation (WPF) and Microsoft Silverlight versions:

  • The WPF version of this control starts 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 that are related to unified communications appear in the following table. For more information, see Lync 2010 Class Libraries References.

Property

Description

GroupViewBySetting

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

ItemContainerStyle

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

GroupItemContainerStyle

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

PersonTwoLineItemTemplate

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

TelephoneTwoLineItemTemplate

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

GroupTwoLineItemTemplate

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

BotTwoLineItemTemplate

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

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

TelephoneItemTemplate

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

GroupItemTemplate

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

BotItemTemplate

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

ShowPivotBar

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

SortBySetting

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

ContactLayoutView

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

ShowFriendlyName

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

ShowFrequentContacts

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

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 Lync Extensibility API Contextual Conversations (Lync 2010 SDK).

Model

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.

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

See Also

Other Resources

Lync 2010 Controls Reference

Lync 2010 Controls