Use the CustomContactList control to provide an arbitrary and non-hierarchical display of contacts and groups for specific contexts. 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 topics in the Lync 2010 API Class Library documentation.

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. For more information about presentity types, please refer to PresentityType elsewhere in the Microsoft Lync 2010 SDK documentation.

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 which controls the display of friendly name strings in the list. When true, contacts will be displayed using their friendly names, such as "John Smith". When false, contacts will be 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 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 .

Code Example

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

  Copy imageCopy Code
<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

Other Resources