ContactSearchInputBox control
Learn about the properties of the Microsoft Lync 2013 ContactSearchInputBox control.
Applies to: Lync 2013
In this article |
Control overview
Use the ContactSearchInputBox control to enable users to search their organization for people based on name, phone number, or skill. The ContactSearchInputBox control displays a text box where users enter a search string. The search is executed automatically, one second after the search text is changed, or explicitly when the user presses Enter in the ContactSearchInputBox. When a search is complete, the results appear in a ContactSearchResultList 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. Use the ContactSearch control in Microsoft Lync Control applications to display the ContactSearchInputBox and ContactSearchResultList controls together in the same location on a page.
Members
Notable ContactSearchInputBox control public properties and events relating to unified communications appear in the following table. For a full list, see Lync 2013 class libraries reference.
Important |
---|
The Results property can contain Lync 2013 API objects. The ContactSearchInputBox control maintains these Lync 2013 API objects and discards them when a new search is started or a search is cleared. If an application stores the Results property, it must manage the existing references to the discarded Lync 2013 API objects. |
Property or event |
Description |
---|---|
Results property |
Gets a SearchResultCollection containing the results of the last completed search. |
IsClearEnabled property |
Gets a bool value that specifies the visibility of the clear search button. This button is enabled whenever there is a value in the search text input box. |
IsSkillSearchEnabled property |
Gets a bool value that indicates whether the skill search feature is enabled. |
SearchState property |
Gets an enumeration value that indicates the current state of the search operation. Valid values are Cleared, Searching, Finished, and Error. |
SearchTextInput property |
Gets or sets a value that sets the current search criteria. When this property is set, any pending search operation is canceled, the search results are reset, and a new search operation is invoked with the given criteria. If this value is set to null, the pending search operation is canceled, the search results are reset, and the control returns to an idle Cleared state. |
SearchType property |
Gets or sets an enumerated value that represents the search type. The type is a SearchType enumeration. Possible values include:
|
MaxResults property |
Gets or sets the maximum number of results to return. |
Code example
The following example can be used for Microsoft Silverlight and Microsoft Windows Presentation Foundation (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>