ContactSearchResultList control

Core concepts

Learn about the properties of the Microsoft Lync 2013 ContactSearchResultList control.

Applies to: Lync 2013

In this article
Control overview
Members
Code example
Additional resources

Control overview

Use the ContactSearchResultList control to display the result of a search performed by the ContactSearchInputBox control.

The ContactSearchResultList control is intended to be used with and bound to a ContactSearchInputBox control. To bind a ContactSearchResultList control to a ContactSearchInputBox control, bind the properties as shown in the code sample later in this topic. The ContactSearchResultList control gets its results collection from the ContactSearchInputBox control.

The ContactSearchInputBox and ContactSearchResultList controls, while related, are designed as separate controls to allow the developer to display search results and search input in separate locations on a page.

ContactSearchResultList

Members

Notable ContactSearchResultList control public properties relating to unified communications appear in the following table. For a full list, see Lync 2013 class libraries reference.

Property or event

Description

ResultsState property

Gets or sets a SearchState enumeration representing the search status. Possible values include:

  • Cleared

  • Searching

  • Finished

  • Error

SearchType property

Gets or sets a SearchType enumeration representing the search type. Possible values include:

  • Name

  • Skill

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.

ShowFriendlyName property

Gets or sets a bool value that determines whether contacts in the list display as friendly names or URIs.

BotItemTemplate property

Gets or sets the DataTemplate used to render a bot item.

GroupItemTemplate property

Gets or sets the DataTemplate used to render a group item.

PersonItemTemplate property

Gets or sets the DataTemplate used to render a person item.

TelephoneItemTemplate property

Gets or sets the DataTemplate used to render a telephone item.

ItemsSource property

This property specifies a collection that is used to generate the content of the ContactSearchResultList control. In typical applications, ContactSearchResultList is intended to display the results of a search that is performed using a ContactSearchInputBox control that appears elsewhere on the page. As shown in the following code example, to establish the connection between these controls, you should bind ItemsSource to the Results property of the ContactSearchInputBox control.

Code example

The following example can be used for Silverlight and WPF application development.

<StackPanel>
  <controls:ContactSearchInputBox x:Name="searchInput"/>
  <controls:ContactSearchResultList
    ItemsSource="{Binding Results, ElementName=searchInput, Mode=OneWay}"
    ResultsState="{Binding SearchState, ElementName=searchInput, Mode=OneWay}"/>
</StackPanel>

See also