CustomContactList control

Core concepts

Learn about using the Microsoft Lync 2013 CustomContactList control to provide an arbitrary and non-hierarchical display of contacts and groups for specific contexts.

Applies to: Lync 2013

In this article
Control overview
Members
Code example
Additional resources

Control overview

CustomContactList is a subclass of ListBox, which is optimized for use in the display of contact information. The CustomContactList control can be used to specify a user-specified collection of contacts. Contacts are displayed using a UI template matching that which is used on the ContactList control. Unlike ContactList, this control permits the user to programmatically specify a list of contacts to display and modify the display settings.

CustomContactList Control

Members

Notable CustomContactList 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 or event

Description

ContactLayoutView property

Gets or sets an enumerated value that toggles the display between OneLine and TwoLines. OneLine is an abbreviated presentation, while TwoLines is a larger layout that includes a photo. The default is TwoLine.

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.

GroupTwoLineItemTemplate property

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

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.

BotItemTemplate property

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

GroupItemTemplate property

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

PersonItemTemplate property

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

TelephoneItemTemplate property

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

ShowFriendlyName property

Gets or sets a bool value that controls the display of friendly name strings in the list. When true, contacts are displayed using their friendly names, such as John Smith. When false, contacts are displayed by URI, such as joe@contoso.com. Gets or sets a Boolean value that specifies whether friendly names are displayed. The default is true.

ContextualInformation property

Gets or sets a data structure that contains information used to customize the information that accompanies messages. For more information about the use of contextual information, see Contextual Lync conversations.

Code example

The following example can be used for Microsoft Silverlight and Microsoft Windows Presentation Foundation (WPF) application development.

<StackPanel>
  <controls:CustomContactList Height="300" x:Name="_xamlCustomContactsList" ContactLayoutView="TwoLines">
   <controls:CustomContactListItem Source="sip:elise@contoso.com"/>
   <controls:CustomContactListItem Source="sip:bob@contoso.com"/>
   <controls:CustomContactListItem Source="sip:mary@contoso.com"/>
  </controls:CustomContactList>
</StackPanel>

See also