Share via


ContactSearchResultList Control

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

Property

Description

ResultsState

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

  • Cleared

  • Searching

  • Finished

  • Error

SearchType

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

  • Name

  • Skill

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

ShowFriendlyName

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

BotItemTemplate

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

GroupItemTemplate

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

PersonItemTemplate

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

TelephoneItemTemplate

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

ItemsSource

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

Other Resources

Lync 2010 Controls Reference

Lync 2010 Controls