CustomContactList Control

Use the CustomContactList control in Microsoft Lync 2010 Control applications 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 that are related to unified communications appear in the following table. For more information, see Lync 2010 Class Libraries References.

Property

Description

ContactLayoutView

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

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

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

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.

BotItemTemplate

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

GroupItemTemplate

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

PersonItemTemplate

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

TelephoneItemTemplate

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

ShowFriendlyName

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

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).

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

Other Resources

Lync 2010 Controls Reference

Lync 2010 Controls