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.

Members

Notable ContactSearchResultList control public properties 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

ResultsState property

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

  • Cleared

  • Searching

  • Finished

  • Error

SearchType property

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

  • Name

  • Skill

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 .

ShowFriendlyName property

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

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.

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

Other Resources